summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog1
-rw-r--r--create/data/data.sql6
-rw-r--r--create/schema/schema.sql2
-rw-r--r--frontends/php/charts.php10
-rw-r--r--frontends/php/config.php56
-rw-r--r--frontends/php/css.css150
-rw-r--r--frontends/php/httpconf.php8
-rw-r--r--frontends/php/httpmon.php4
-rw-r--r--frontends/php/images/general/bar/bg.gifbin855 -> 852 bytes
-rw-r--r--frontends/php/images/general/bar/left.gifbin943 -> 938 bytes
-rw-r--r--frontends/php/images/general/bar/right.gifbin941 -> 935 bytes
-rw-r--r--frontends/php/images/general/zabbix_bb.icobin0 -> 1150 bytes
-rw-r--r--frontends/php/images/general/zabbix_bb.pngbin0 -> 5405 bytes
-rw-r--r--frontends/php/images/general/zabbix_ob.icobin0 -> 1150 bytes
-rw-r--r--frontends/php/images/gradients/gradient.pngbin0 -> 3087 bytes
-rw-r--r--frontends/php/images/gradients/menu_not_active_bb.gifbin0 -> 3740 bytes
-rw-r--r--frontends/php/images/gradients/table_head2_bb.gifbin0 -> 1933 bytes
-rw-r--r--frontends/php/images/gradients/table_head_bb.gifbin0 -> 3410 bytes
-rw-r--r--frontends/php/include/config.inc.php55
-rw-r--r--frontends/php/include/defines.inc.php1
-rw-r--r--frontends/php/include/forms.inc.php27
-rw-r--r--frontends/php/include/locales/en_gb.inc.php6
-rw-r--r--frontends/php/include/page_header.php43
-rw-r--r--frontends/php/include/users.inc.php14
-rw-r--r--frontends/php/items.php2
-rw-r--r--frontends/php/js/common.js2
-rw-r--r--frontends/php/js/scrollbar.js1
-rw-r--r--frontends/php/locales.php6
-rw-r--r--frontends/php/profile.php3
-rw-r--r--frontends/php/styles/bar.css25
-rw-r--r--frontends/php/styles/css_bb.css247
-rw-r--r--frontends/php/styles/css_ob.css1
-rw-r--r--frontends/php/styles/default.css170
-rw-r--r--frontends/php/styles/div.css10
-rw-r--r--frontends/php/styles/link.css130
-rw-r--r--frontends/php/styles/p.css59
-rw-r--r--frontends/php/styles/table.css17
-rw-r--r--frontends/php/triggers.php2
-rw-r--r--frontends/php/users.php5
39 files changed, 712 insertions, 351 deletions
diff --git a/ChangeLog b/ChangeLog
index 9008a713..50737921 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
Changes for 1.5:
+ - [DEV-112] added themes option in frontend (Artem)
- [DEV-114] special processing of simple SNMP OIDs like ifDescr, ifInOctets, etc (Alexei)
- [DEV-114] monitoring of SNMP objects having flexible Index (Alexei)
- [DEV-104] added maintenance mode (Artem)
diff --git a/create/data/data.sql b/create/data/data.sql
index afd53f9d..0a9df379 100644
--- a/create/data/data.sql
+++ b/create/data/data.sql
@@ -21,7 +21,7 @@
-- Dumping data for table `config`
--
-INSERT INTO config VALUES (1,365,365,600,'1-5,00:00-24:00',7,1,7,100);
+INSERT INTO config VALUES (1,365,365,600,'1-5,00:00-24:00',7,1,7,100,'default.css');
--
-- Dumping data for table `scripts`
@@ -34,8 +34,8 @@ INSERT INTO scripts VALUES (2,'Traceroute','/usr/bin/traceroute {HOST.CONN}',0);
-- Dumping data for table `users`
--
-INSERT INTO users VALUES (1,'Admin','Zabbix','Administrator','d41d8cd98f00b204e9800998ecf8427e','',900,'en_gb',30,3);
-INSERT INTO users VALUES (2,'guest','Default','User','d41d8cd98f00b204e9800998ecf8427e','',900,'en_gb',30,1);
+INSERT INTO users VALUES (1,'Admin','Zabbix','Administrator','d41d8cd98f00b204e9800998ecf8427e','',900,'en_gb',30,3,'deafault.css');
+INSERT INTO users VALUES (2,'guest','Default','User','d41d8cd98f00b204e9800998ecf8427e','',900,'en_gb',30,1,'default.css');
--
-- Dumping data for table `usrgrp`
diff --git a/create/schema/schema.sql b/create/schema/schema.sql
index a018c52f..d305e5c3 100644
--- a/create/schema/schema.sql
+++ b/create/schema/schema.sql
@@ -330,6 +330,7 @@ FIELD |alert_usrgrpid |t_id |'0' |NOT NULL |ZBX_SYNC
FIELD |event_ack_enable|t_integer |'1' |NOT NULL |ZBX_SYNC
FIELD |event_expire |t_integer |'7' |NOT NULL |ZBX_SYNC
FIELD |event_show_max |t_integer |'100' |NOT NULL |ZBX_SYNC
+FIELD |default_theme |t_varchar(128) |'default.css' |NOT NULL |ZBX_SYNC
TABLE|functions|functionid|ZBX_SYNC
FIELD |functionid |t_id |'0' |NOT NULL |0
@@ -661,6 +662,7 @@ FIELD |autologout |t_integer |'900' |NOT NULL |ZBX_SYNC
FIELD |lang |t_varchar(5) |'en_gb'|NOT NULL |ZBX_SYNC
FIELD |refresh |t_integer |'30' |NOT NULL |ZBX_SYNC
FIELD |type |t_integer |'0' |NOT NULL |ZBX_SYNC
+FIELD |theme |t_varchar(128) |'default.css' |NOT NULL |ZBX_SYNC
INDEX |1 |alias
TABLE|usrgrp|usrgrpid|ZBX_SYNC
diff --git a/frontends/php/charts.php b/frontends/php/charts.php
index 1db027e1..9d3be1e8 100644
--- a/frontends/php/charts.php
+++ b/frontends/php/charts.php
@@ -256,7 +256,6 @@ include_once 'include/page_header.php';
' AND h.hostid=i.hostid '.
' AND hg.groupid='.$_REQUEST['groupid'].
' AND hg.hostid=h.hostid '.
-// ' AND h.hostid NOT IN ('.$denyed_hosts.') '.
' AND h.hostid IN ('.$availiable_hosts.') '.
' AND i.itemid=gi.itemid'.
' ORDER BY h.host';
@@ -267,7 +266,6 @@ include_once 'include/page_header.php';
' WHERE h.status='.HOST_STATUS_MONITORED.
' AND i.status='.ITEM_STATUS_ACTIVE.
' AND h.hostid=i.hostid'.
-// ' AND h.hostid NOT IN ('.$denyed_hosts.') '.
' AND h.hostid IN ('.$availiable_hosts.') '.
' AND i.itemid=gi.itemid'.
' ORDER BY h.host';
@@ -290,7 +288,6 @@ include_once 'include/page_header.php';
' AND g.graphid=gi.graphid '.
' AND i.hostid='.$_REQUEST['hostid'].
' AND '.DBin_node('g.graphid').
-// ' AND i.hostid NOT IN ('.$denyed_hosts.') '.
' AND i.hostid IN ('.$availiable_hosts.') '.
' ORDER BY g.name';
}
@@ -304,7 +301,6 @@ include_once 'include/page_header.php';
' AND i.hostid=h.hostid '.
' AND h.status='.HOST_STATUS_MONITORED.
' AND '.DBin_node('g.graphid').
-// ' AND h.hostid NOT IN ('.$denyed_hosts.') '.
' AND h.hostid IN ('.$availiable_hosts.') '.
' ORDER BY g.name';
}
@@ -316,7 +312,6 @@ include_once 'include/page_header.php';
' AND i.hostid=h.hostid '.
' AND h.status='.HOST_STATUS_MONITORED.
' AND '.DBin_node('g.graphid').
-// ' AND h.hostid NOT IN ('.$denyed_hosts.') '.
' AND h.hostid IN ('.$availiable_hosts.') '.
' ORDER BY g.name';
}
@@ -395,7 +390,7 @@ include_once 'include/page_header.php';
//ZBX_G_WIDTH-= '.($shiftXleft+$shiftXright+27).';
document.write(\'<img id="'.$dom_graph_id.'" src="chart2.php?graphid='.$_REQUEST['graphid'].url_param('stime').
- '&period='.$effectiveperiod.'&width=\'+ZBX_G_WIDTH+\'" /><br /><br />\');
+ '&period='.$effectiveperiod.'&width=\'+ZBX_G_WIDTH+\'" /><br />\');
-->
</script>'."\n";
}
@@ -403,7 +398,8 @@ include_once 'include/page_header.php';
$table->AddRow(new CScript($row));
}
$table->Show();
-
+ echo SBR;
+
if($_REQUEST['graphid'] > 0)
{
// NAV BAR
diff --git a/frontends/php/config.php b/frontends/php/config.php
index d4705340..b4b15306 100644
--- a/frontends/php/config.php
+++ b/frontends/php/config.php
@@ -34,7 +34,7 @@ include_once "include/page_header.php";
$fields=array(
// VAR TYPE OPTIONAL FLAGS VALIDATION EXCEPTION
- "config"=> array(T_ZBX_INT, O_OPT, NULL, IN("0,3,5,6,7,8"), NULL),
+ "config"=> array(T_ZBX_INT, O_OPT, NULL, IN("0,3,5,6,7,8,9"), NULL),
// other form
"alert_history"=> array(T_ZBX_INT, O_NO, NULL, BETWEEN(0,65535), 'isset({config})&&({config}==0)&&isset({save})'),
@@ -65,6 +65,8 @@ include_once "include/page_header.php";
'event_ack_enable'=> array(T_ZBX_INT, O_OPT, P_SYS|P_ACT, IN("0,1"), 'isset({config})&&({config}==8)&&isset({save})'),
'event_expire'=> array(T_ZBX_INT, O_OPT, P_SYS|P_ACT, BETWEEN(1,65535), 'isset({config})&&({config}==8)&&isset({save})'),
'event_show_max'=> array(T_ZBX_INT, O_OPT, P_SYS|P_ACT, BETWEEN(1,65535), 'isset({config})&&({config}==8)&&isset({save})'),
+/* Themes */
+ 'default_theme'=> array(T_ZBX_STR, O_OPT, NULL, NOT_EMPTY, 'isset({config})&&({config}==9)&&isset({save})'),
/* other */
"form"=> array(T_ZBX_STR, O_OPT, P_SYS, NULL, NULL),
"form_refresh"=> array(T_ZBX_INT, O_OPT, NULL, NULL, NULL)
@@ -132,16 +134,12 @@ include_once "include/page_header.php";
access_deny();
/* OTHER ACTIONS */
- $result=update_config(
- get_request('event_history'),
- get_request('alert_history'),
- get_request('refresh_unsupported'),
- get_request('work_period'),
- get_request('alert_usrgrpid'),
- get_request('event_ack_enable'),
- get_request('event_expire'),
- get_request('event_show_max')
+ $configs = array(
+ 'event_ack_enable' => get_request('event_ack_enable'),
+ 'event_expire' => get_request('event_expire'),
+ 'event_show_max' => get_request('event_show_max')
);
+ $result=update_config($configs);
show_messages($result, S_CONFIGURATION_UPDATED, S_CONFIGURATION_WAS_NOT_UPDATED);
@@ -158,6 +156,23 @@ include_once "include/page_header.php";
add_audit(AUDIT_ACTION_UPDATE,AUDIT_RESOURCE_ZABBIX_CONFIG,implode('; ',$msg));
}
}
+ elseif(isset($_REQUEST["save"]) && ($_REQUEST["config"]==9)){
+ if(count(get_accessible_nodes_by_user($USER_DETAILS,PERM_READ_WRITE,PERM_MODE_LT,PERM_RES_IDS_ARRAY,get_current_nodeid())))
+ access_deny();
+
+/* OTHER ACTIONS */
+ $configs = array(
+ 'default_theme' => get_request('default_theme')
+ );
+ $result=update_config($configs);
+
+ show_messages($result, S_CONFIGURATION_UPDATED, S_CONFIGURATION_WAS_NOT_UPDATED);
+
+ if($result){
+ $msg = S_DEFAULT_THEME.' ['.get_request('default_theme').']';
+ add_audit(AUDIT_ACTION_UPDATE,AUDIT_RESOURCE_ZABBIX_CONFIG,$msg);
+ }
+ }
elseif(isset($_REQUEST["save"])&&uint_in_array($_REQUEST["config"],array(0,5,7)))
{
@@ -165,16 +180,14 @@ include_once "include/page_header.php";
access_deny();
/* OTHER ACTIONS */
- $result=update_config(
- get_request('event_history'),
- get_request('alert_history'),
- get_request('refresh_unsupported'),
- get_request('work_period'),
- get_request('alert_usrgrpid'),
- get_request('event_ack_enable'),
- get_request('event_expire'),
- get_request('event_show_max')
+ $configs = array(
+ 'event_history' => get_request('event_history'),
+ 'alert_history' => get_request('alert_history'),
+ 'refresh_unsupported' => get_request('refresh_unsupported'),
+ 'work_period' => get_request('work_period'),
+ 'alert_usrgrpid' => get_request('alert_usrgrpid')
);
+ $result=update_config($configs);
show_messages($result, S_CONFIGURATION_UPDATED, S_CONFIGURATION_WAS_NOT_UPDATED);
if($result)
@@ -295,6 +308,7 @@ include_once "include/page_header.php";
$cmbConfig->AddItem(0,S_HOUSEKEEPER);
// $cmbConfig->AddItem(2,S_ESCALATION_RULES);
$cmbConfig->AddItem(3,S_IMAGES);
+ $cmbConfig->AddItem(9,S_THEMES);
// $cmbConfig->AddItem(4,S_AUTOREGISTRATION);
$cmbConfig->AddItem(6,S_VALUE_MAPPING);
$cmbConfig->AddItem(7,S_WORKING_TIME);
@@ -332,6 +346,10 @@ include_once "include/page_header.php";
{
insert_event_ack_form();
}
+ elseif($_REQUEST["config"]==9)
+ {
+ insert_themes_form();
+ }
elseif($_REQUEST["config"]==3)
{
if(isset($_REQUEST["form"]))
diff --git a/frontends/php/css.css b/frontends/php/css.css
index 764ac164..cc068365 100644
--- a/frontends/php/css.css
+++ b/frontends/php/css.css
@@ -1,4 +1,5 @@
/* CSS Document */
+@import "styles/default.css";
@import "styles/div.css";
@import "styles/link.css";
@import "styles/table.css";
@@ -9,152 +10,3 @@
@import "styles/bar.css";
@import "styles/gmenu.css";
@import "styles/sbox.css";
-
-body{
- background-color:#e5e5e5;
- margin: 0px;
- padding: 0px;
- color:black;
- font-family:verdana, arial, helvetica, sans-serif;
- font-size:10px;
- text-decoration: none;
- line-height:16px;
-}
-/**************** MEDIA *****************/
-@media print {
- div.printless{
- visibility: hidden;
- display: none;
- }
- div.printonly{
- display: block;
- visibility:visible;
- }
-}
-
-@media screen {
- div.printless{
- visibility:visible;
- display:block;
- }
- div.printonly{
- visibility: hidden;
- display:none;
- }
-}
-
-/**************** OTHERS ****************/
-.top { vertical-align: top; }
-.footer { color:#CCCCCC; }
-
-.enabled { color: #00AA00; }
-.disabled { color: #AA0000; }
-.unknown { color: #AAAAAA; }
-.on { color: #AA0000; }
-.off { color: #00AA00; }
-
-.disaster { background-color: #FF0000; }
-.high { background-color: #FF8888; }
-.average { background-color: #DDAAAA; }
-.warning { background-color: #EFEFCC; }
-.information { background-color: #CCE2CC; }
-.unknown_trigger{ background-color: #BCBCBC; }
-.normal { background-color: #AADDAA; }
-
-.img { border-color:black; border-width:1px; }
-img.top { vertical-align:text-top }
-img.bottom { vertical-align:text-bottom }
-
-.center{
- width: 100%;
- text-align: center;
-}
-
-.vert{
- width:1px;
- /*writing-mode: tb-rl;*/
-}
-
-.rarr{
- font-size: 16px;
-}
-
-.bold {
- font-weight: bold;
-}
-
-.nowrap {
- white-space: nowrap;
- word-spacing: 0px;
-}
-
-.delimiter{
- font-weight:bold;
- color:#000;
-}
-
-/**************** HINT BOX *****************/
-
-#hint_box {
- top: 0;
- z-index: 100;
- position: absolute;
- background-color: #FFFFE0;
- padding: 2px;
- font-family: Verdana, Arial, Helvetica, sans-serif;
- font-size: 8pt;
- line-height:15px;
- border: 1px solid black;
- border-left: none;
- border-top: none;
- visibility: hidden;
-}
-
-/************** END OF HINT BOX ************/
-
-/************** COLOR PICKER ***************/
-#color_picker {
- top: 0;
- z-index: 100;
- position: absolute;
- background-color: white;
- padding: 2px;
- font-family: Verdana, Arial, Helvetica, sans-serif;
- font-size: 10px;
- line-height:15px;
- border: 1px solid black;
-}
-
-#color_picker table tr td {
- margin: 0px;
- padding: 2px;
-}
-
-#color_picker a {
- text-decoration: none;
- font-family: Verdana, Arial, Helvetica, sans-serif;
- font-size: 10px;
- padding: 0px;
- margin: 0px;
-}
-
-/************ END OF COLOR PICKER ***********/
-
-/************** DISCOVERY STATUS ************/
-.dhosts_active {
- padding: 5px;
- text-align: center;
- color: #0FA00F;
-}
-.dhosts_disabled {
- padding: 5px;
- text-align: center;
- color: #A00F0F;
-}
-.dservice_active {
- background: #0FA00F;
-}
-.dservice_disabled {
- background: #A00F0F;
-}
-/********** END OF DISCOVERY STATUS *********/ \ No newline at end of file
diff --git a/frontends/php/httpconf.php b/frontends/php/httpconf.php
index 5b6111d7..b116ba65 100644
--- a/frontends/php/httpconf.php
+++ b/frontends/php/httpconf.php
@@ -357,7 +357,7 @@ include_once "include/page_header.php";
$form->AddItem(array('[',
new CLink($showdisabled ? S_HIDE_DISABLED_SCENARIOS: S_SHOW_DISABLED_SCENARIOS,
- '?showdisabled='.($showdisabled ? 0 : 1),'action'),
+ '?showdisabled='.($showdisabled ? 0 : 1),NULL),
']', SPACE));
$cmbGroup = new CComboBox("groupid",$_REQUEST["groupid"],"submit();");
@@ -475,7 +475,7 @@ include_once "include/page_header.php";
array_push($name, new CLink($httptest_data["name"],"?form=update&httptestid=".
$httptest_data["httptestid"].url_param("hostid").url_param("groupid"),
- 'action'));
+ NULL));
$status=new CCol(new CLink(httptest_status2str($httptest_data["status"]),
"?group_httptestid%5B%5D=".$httptest_data["httptestid"].
@@ -486,8 +486,8 @@ include_once "include/page_header.php";
$chkBox = new CCheckBox("group_httptestid[]",null,null,$httptest_data["httptestid"]);
- $step_cout = DBfetch(DBselect('select count(*) from httpstep where httptestid='.$httptest_data["httptestid"]));
- $step_cout = $step_cout[0];
+ $step_cout = DBfetch(DBselect('select count(*) as cnt from httpstep where httptestid='.$httptest_data["httptestid"]));
+ $step_cout = $step_cout['cnt'];
/* if($httptest_data["templateid"] > 0) $chkBox->SetEnabled(false); // for future use */
diff --git a/frontends/php/httpmon.php b/frontends/php/httpmon.php
index e2e1fee4..af62418f 100644
--- a/frontends/php/httpmon.php
+++ b/frontends/php/httpmon.php
@@ -204,8 +204,8 @@ include_once "include/page_header.php";
array_push($name, new CLink($httptest_data["name"],"httpdetails.php?httptestid=".$httptest_data['httptestid'],'action'));
- $step_cout = DBfetch(DBselect('select count(*) from httpstep where httptestid='.$httptest_data["httptestid"]));
- $step_cout = $step_cout[0];
+ $step_cout = DBfetch(DBselect('select count(*) as cnt from httpstep where httptestid='.$httptest_data["httptestid"]));
+ $step_cout = $step_cout['cnt'];
if(isset($httptest_data["lastcheck"]))
$lastcheck = date(S_DATE_FORMAT_YMDHMS,$httptest_data["lastcheck"]);
diff --git a/frontends/php/images/general/bar/bg.gif b/frontends/php/images/general/bar/bg.gif
index 4058d437..d9d50476 100644
--- a/frontends/php/images/general/bar/bg.gif
+++ b/frontends/php/images/general/bar/bg.gif
Binary files differ
diff --git a/frontends/php/images/general/bar/left.gif b/frontends/php/images/general/bar/left.gif
index 3877f50b..1ccb593b 100644
--- a/frontends/php/images/general/bar/left.gif
+++ b/frontends/php/images/general/bar/left.gif
Binary files differ
diff --git a/frontends/php/images/general/bar/right.gif b/frontends/php/images/general/bar/right.gif
index 4cb55ef4..78f2ce2b 100644
--- a/frontends/php/images/general/bar/right.gif
+++ b/frontends/php/images/general/bar/right.gif
Binary files differ
diff --git a/frontends/php/images/general/zabbix_bb.ico b/frontends/php/images/general/zabbix_bb.ico
new file mode 100644
index 00000000..2ea74159
--- /dev/null
+++ b/frontends/php/images/general/zabbix_bb.ico
Binary files differ
diff --git a/frontends/php/images/general/zabbix_bb.png b/frontends/php/images/general/zabbix_bb.png
new file mode 100644
index 00000000..40599295
--- /dev/null
+++ b/frontends/php/images/general/zabbix_bb.png
Binary files differ
diff --git a/frontends/php/images/general/zabbix_ob.ico b/frontends/php/images/general/zabbix_ob.ico
new file mode 100644
index 00000000..75dcc83d
--- /dev/null
+++ b/frontends/php/images/general/zabbix_ob.ico
Binary files differ
diff --git a/frontends/php/images/gradients/gradient.png b/frontends/php/images/gradients/gradient.png
new file mode 100644
index 00000000..9c825d9c
--- /dev/null
+++ b/frontends/php/images/gradients/gradient.png
Binary files differ
diff --git a/frontends/php/images/gradients/menu_not_active_bb.gif b/frontends/php/images/gradients/menu_not_active_bb.gif
new file mode 100644
index 00000000..074ba55e
--- /dev/null
+++ b/frontends/php/images/gradients/menu_not_active_bb.gif
Binary files differ
diff --git a/frontends/php/images/gradients/table_head2_bb.gif b/frontends/php/images/gradients/table_head2_bb.gif
new file mode 100644
index 00000000..eca8b780
--- /dev/null
+++ b/frontends/php/images/gradients/table_head2_bb.gif
Binary files differ
diff --git a/frontends/php/images/gradients/table_head_bb.gif b/frontends/php/images/gradients/table_head_bb.gif
new file mode 100644
index 00000000..64a6d54a
--- /dev/null
+++ b/frontends/php/images/gradients/table_head_bb.gif
Binary files differ
diff --git a/frontends/php/include/config.inc.php b/frontends/php/include/config.inc.php
index 5ecaa690..325a9e0a 100644
--- a/frontends/php/include/config.inc.php
+++ b/frontends/php/include/config.inc.php
@@ -712,7 +712,7 @@ function TODO($msg) { echo "TODO: ".$msg.SBR; } // DEBUG INFO!!!
default:
$p = new CTag('p','yes');
$p->AddOption('align','center');
- $p->AddOption('style','color: '.((!$bool)?'#AA0000;':'#223344;'));
+ $p->AddOption('class',((!$bool)?'msgerror':'msgok'));
$p->AddItem(bold('['.$msg.']'));
$p->Show();
break;
@@ -1016,60 +1016,34 @@ function TODO($msg) { echo "TODO: ".$msg.SBR; } // DEBUG INFO!!!
# Update configuration
- function update_config($event_history,$alert_history,$refresh_unsupported,$work_period,$alert_usrgrpid,$event_ack_enable,$event_expire,$event_show_max)
+ function update_config($configs)
{
$update = array();
-
- if(!is_null($event_history))
- {
- $update[] = 'event_history='.$event_history;
- }
- if(!is_null($alert_history))
- {
- $update[] = 'alert_history='.$alert_history;
- }
- if(!is_null($refresh_unsupported))
- {
- $update[] = 'refresh_unsupported='.$refresh_unsupported;
- }
- if(!is_null($work_period))
- {
- if( !validate_period($work_period) )
- {
+
+ if(isset($configs['work_period']) && !is_null($configs['work_period'])){
+ if(!validate_period($configs['work_period'])){
error(S_ICORRECT_WORK_PERIOD);
return NULL;
}
- $update[] = 'work_period='.zbx_dbstr($work_period);
}
- if(!is_null($alert_usrgrpid))
- {
- if($alert_usrgrpid != 0 && !DBfetch(DBselect('select usrgrpid from usrgrp where usrgrpid='.$alert_usrgrpid)))
- {
+ if(isset($configs['alert_usrgrpid']) && !is_null($configs['alert_usrgrpid'])){
+ if(($configs['alert_usrgrpid'] != 0) && !DBfetch(DBselect('select usrgrpid from usrgrp where usrgrpid='.$configs['alert_usrgrpid']))){
error(S_INCORRECT_GROUP);;
return NULL;
}
- $update[] = 'alert_usrgrpid='.$alert_usrgrpid;
- }
- if(!is_null($event_ack_enable))
- {
- $update[] = 'event_ack_enable='.$event_ack_enable;
- }
- if(!is_null($event_expire))
- {
- $update[] = 'event_expire='.$event_expire;
}
- if(!is_null($event_show_max))
- {
- $update[] = 'event_show_max='.$event_show_max;
+
+ foreach($configs as $key => $value){
+ if(!is_null($value))
+ $update[] = $key.'='.zbx_dbstr($value);
}
- if(count($update) == 0)
- {
+
+ if(count($update) == 0){
error(S_NOTHING_TO_DO);
return NULL;
}
- return DBexecute('update config set '.implode(',',$update).
- ' where '.DBin_node('configid', get_current_nodeid(false)));
+ return DBexecute('update config set '.implode(',',$update).' where '.DBin_node('configid', get_current_nodeid(false)));
}
/* Function:
@@ -1149,6 +1123,7 @@ function TODO($msg) { echo "TODO: ".$msg.SBR; } // DEBUG INFO!!!
$table->AddRow($tr);
$table->Show();
+ echo SBR;
}
diff --git a/frontends/php/include/defines.inc.php b/frontends/php/include/defines.inc.php
index 7a7a1db7..de3710b0 100644
--- a/frontends/php/include/defines.inc.php
+++ b/frontends/php/include/defines.inc.php
@@ -489,6 +489,7 @@ if((ini_get('mbstring.func_overload') > 5)){
define('ZBX_HISTORY_COUNT',5);
define('ZBX_GUEST_USER','guest');
+ define('ZBX_DEFAULT_CSS','default.css');
/* Define if your logs are in non-standard format */
/* define('ZBX_LOG_ENCODING_DEFAULT', 'Shift_JIS');*/
diff --git a/frontends/php/include/forms.inc.php b/frontends/php/include/forms.inc.php
index d68bb578..64f2ee99 100644
--- a/frontends/php/include/forms.inc.php
+++ b/frontends/php/include/forms.inc.php
@@ -701,6 +701,7 @@
$url = $user["url"];
$autologout = $user["autologout"];
$lang = $user["lang"];
+ $theme = $user['theme'];
$refresh = $user["refresh"];
$user_type = $user["type"];
@@ -741,6 +742,7 @@
$url = get_request("url","");
$autologout = get_request("autologout",900);
$lang = get_request("lang","en_gb");
+ $theme = get_request('theme','default.css');
$refresh = get_request("refresh",30);
$user_type = get_request("user_type",USER_TYPE_ZABBIX_USER);;
$user_groups = get_request("user_groups",array());
@@ -876,6 +878,13 @@
}
$frmUser->AddRow(S_LANGUAGE, $cmbLang);
+
+ $cmbTheme = new CComboBox('theme',$theme);
+ $cmbTheme->AddItem(ZBX_DEFAULT_CSS,S_SYSTEM_DEFAULT);
+ $cmbTheme->AddItem('css_ob.css',S_ORIGINAL_BLUE);
+ $cmbTheme->AddItem('css_bb.css',S_BLACK_AND_BLUE);
+
+ $frmUser->AddRow(S_THEME, $cmbTheme);
$frmUser->AddRow(S_AUTO_LOGOUT_IN_SEC, new CNumericBox("autologout",$autologout,4));
$frmUser->AddRow(S_URL_AFTER_LOGIN, new CTextBox("url",$url,50));
@@ -4090,8 +4099,24 @@ include_once 'include/discovery.inc.php';
$frmHouseKeep->AddItemToBottomRow(new CButton("save",S_SAVE));
$frmHouseKeep->Show();
}
+
+ function insert_themes_form(){
+ $config=select_config();
+
+ $frmThemes = new CFormTable(S_THEMES,"config.php");
+ $frmThemes->AddVar("config",get_request("config",9));
+
+ $cmbTheme = new CComboBox('default_theme',$config['default_theme']);
+ $cmbTheme->AddItem('css_ob.css',S_ORIGINAL_BLUE);
+ $cmbTheme->AddItem('css_bb.css',S_BLACK_AND_BLUE);
+
+ $frmThemes->AddRow(S_DEFAULT_THEME,$cmbTheme);
+
+ $frmThemes->AddItemToBottomRow(new CButton("save",S_SAVE));
+ $frmThemes->Show();
+ }
- function insert_event_ack_form()
+ function insert_event_ack_form()
{
$config=select_config();
diff --git a/frontends/php/include/locales/en_gb.inc.php b/frontends/php/include/locales/en_gb.inc.php
index 42056e0a..4191c860 100644
--- a/frontends/php/include/locales/en_gb.inc.php
+++ b/frontends/php/include/locales/en_gb.inc.php
@@ -377,6 +377,11 @@
'S_YELLOW'=> 'Yellow',
// config.php
+ 'S_THEMES'=> 'Themes',
+ 'S_SYSTEM_DEFAULT'=> 'System default',
+ 'S_BLACK_AND_BLUE'=> 'Black & Blue',
+ 'S_ORIGINAL_BLUE'=> 'Original blue',
+ 'S_DEFAULT_THEME'=> 'Default theme',
'S_EVENT_ACKNOWLEDGES'=> 'Event acknowledges',
'S_DAYS'=> 'Days',
'S_SHOW_EVENTS_NOT_OLDER'=> 'Show events not older',
@@ -1395,6 +1400,7 @@
'S_USER_PROFILE_BIG'=> 'USER PROFILE',
'S_USER_PROFILE'=> 'User profile',
'S_LANGUAGE'=> 'Language',
+ 'S_THEME'=> 'Theme',
'S_ENGLISH_GB'=> 'English (GB)',
'S_FRENCH_FR'=> 'French (FR)',
'S_GERMAN_DE'=> 'German (DE)',
diff --git a/frontends/php/include/page_header.php b/frontends/php/include/page_header.php
index 3802cc6d..d5805886 100644
--- a/frontends/php/include/page_header.php
+++ b/frontends/php/include/page_header.php
@@ -357,9 +357,37 @@ COpt::profiling_start("page");
echo '<meta http-equiv="refresh" content="'.$USER_DETAILS["refresh"].'" />';
}
?>
- <link rel="stylesheet" href="css.css" />
- <link rel="shortcut icon" href="images/general/zabbix.ico">
<meta name="Author" content="ZABBIX SIA" />
+ <link rel="stylesheet" href="css.css" />
+<?php
+ global $DB;
+ if(!is_null($DB)){
+ $css = false;
+ $config=select_config();
+ if(isset($config['default_theme']) && file_exists('styles/'.$config['default_theme'])){
+ $css = $config['default_theme'];
+ }
+
+ if(isset($USER_DETAILS['theme']) && ($USER_DETAILS['theme']!=ZBX_DEFAULT_CSS)){
+ if(file_exists('styles/'.$USER_DETAILS['theme'])){
+ $css = $USER_DETAILS['theme'];
+ }
+ }
+
+ if($css){
+ echo '<link rel="stylesheet" href="styles/'.$css.'" />';
+ $ico = ereg_replace('.*(\_[a-z]+).*',"\\1",$css);
+ if(file_exists('images/general/zabbix'.$ico.'.ico'))
+ echo '<link rel="shortcut icon" href="images/general/zabbix'.$ico.'.ico">';
+ else
+ echo '<link rel="shortcut icon" href="images/general/zabbix.ico">';
+ }
+ else{
+ echo '<link rel="shortcut icon" href="images/general/zabbix.ico">';
+ }
+ }
+?>
+
<script type="text/javascript" src="js/common.js"></script>
<?php
if(isset($page['scripts']) && is_array($page['scripts'])){
@@ -404,7 +432,7 @@ COpt::compare_files_with_menu($ZBX_MENU);
$support->SetTarget('_blank');
$printview = new CLink(S_PRINT, $_SERVER['REQUEST_URI'].(empty($_GET)?'?':'&').'print=1', 'small_font');
- $page_header_r_col = array($help,'|', $support,'|',$printview);
+ $page_header_r_col = array($help,'|',$support,'|',$printview);
if($USER_DETAILS["alias"]!=ZBX_GUEST_USER){
$page_header_r_col[] = array("|",
@@ -414,10 +442,13 @@ COpt::compare_files_with_menu($ZBX_MENU);
$page_header_r_col[] = array("|", new CLink(S_LOGIN, "index.php?reconnect=1", "small_font"));
}
- $logo = new CLink(new CImg("images/general/zabbix.png","ZABBIX"),"http://www.zabbix.com");
+ $logo = new CLink(new CDiv(SPACE,'zabbix_logo'),"http://www.zabbix.com");
$logo->SetTarget('_blank');
-
- $top_page_row = array(new CCol($logo, "page_header_l"), new CCol($page_header_r_col, "page_header_r"));
+// $logo = new CSpan(SPACE,'zabbix_logo');
+ $td_r = new CCol($page_header_r_col, "page_header_r");
+ $td_r->AddOption('width','100%');
+// $top_page_row = array(new CCol($logo, "page_header_l"), new CCol($page_header_r_col, "page_header_r"));
+ $top_page_row = array(new CCol($logo, "page_header_l"), $td_r);
unset($logo, $page_header_r_col, $help, $support);
$table = new CTable(NULL,"page_header");
diff --git a/frontends/php/include/users.inc.php b/frontends/php/include/users.inc.php
index 4e83a47d..50771ba8 100644
--- a/frontends/php/include/users.inc.php
+++ b/frontends/php/include/users.inc.php
@@ -33,7 +33,7 @@
# Add User definition
- function add_user($name,$surname,$alias,$passwd,$url,$autologout,$lang,$refresh,$user_type,$user_groups,$user_medias)
+ function add_user($name,$surname,$alias,$passwd,$url,$autologout,$lang,$theme,$refresh,$user_type,$user_groups,$user_medias)
{
global $USER_DETAILS;
@@ -50,9 +50,9 @@
$userid = get_dbid("users","userid");
- $result = DBexecute('insert into users (userid,name,surname,alias,passwd,url,autologout,lang,refresh,type)'.
+ $result = DBexecute('insert into users (userid,name,surname,alias,passwd,url,autologout,lang,theme,refresh,type)'.
' values ('.$userid.','.zbx_dbstr($name).','.zbx_dbstr($surname).','.zbx_dbstr($alias).','.
- zbx_dbstr(md5($passwd)).','.zbx_dbstr($url).','.$autologout.','.zbx_dbstr($lang).','.$refresh.','.$user_type.')');
+ zbx_dbstr(md5($passwd)).','.zbx_dbstr($url).','.$autologout.','.zbx_dbstr($lang).','.zbx_dbstr($theme).','.$refresh.','.$user_type.')');
if($result)
{
@@ -86,7 +86,7 @@
# Update User definition
- function update_user($userid,$name,$surname,$alias,$passwd, $url,$autologout,$lang,$refresh,$user_type,$user_groups,$user_medias)
+ function update_user($userid,$name,$surname,$alias,$passwd, $url,$autologout,$lang,$theme,$refresh,$user_type,$user_groups,$user_medias)
{
if(DBfetch(DBselect("select * from users where alias=".zbx_dbstr($alias).
" and userid<>$userid and ".DBin_node('userid', get_current_nodeid(false)))))
@@ -97,7 +97,7 @@
$result = DBexecute("update users set name=".zbx_dbstr($name).",surname=".zbx_dbstr($surname).","."alias=".zbx_dbstr($alias).
(isset($passwd) ? (',passwd='.zbx_dbstr(md5($passwd))) : '').
- ",url=".zbx_dbstr($url).","."autologout=$autologout,lang=".zbx_dbstr($lang).",refresh=$refresh,".
+ ",url=".zbx_dbstr($url).","."autologout=$autologout,lang=".zbx_dbstr($lang).",theme=".zbx_dbstr($theme).",refresh=$refresh,".
"type=$user_type".
" where userid=$userid");
@@ -134,7 +134,7 @@
# Update User definition
- function update_user_profile($userid,$passwd, $url,$autologout,$lang,$refresh)
+ function update_user_profile($userid,$passwd, $url,$autologout,$lang,$theme,$refresh)
{
global $USER_DETAILS;
@@ -143,7 +143,7 @@
access_deny();
}
- return DBexecute("update users set url=".zbx_dbstr($url).",autologout=$autologout,lang=".zbx_dbstr($lang).
+ return DBexecute("update users set url=".zbx_dbstr($url).",autologout=$autologout,lang=".zbx_dbstr($lang).",theme=".zbx_dbstr($theme).
(isset($passwd) ? (',passwd='.zbx_dbstr(md5($passwd))) : '').
",refresh=$refresh where userid=$userid");
}
diff --git a/frontends/php/items.php b/frontends/php/items.php
index 9a73739f..8f76da79 100644
--- a/frontends/php/items.php
+++ b/frontends/php/items.php
@@ -664,7 +664,7 @@ include_once "include/page_header.php";
$form->AddItem(array('[',
new CLink($showdisabled ? S_HIDE_DISABLED_ITEMS : S_SHOW_DISABLED_ITEMS,
- '?showdisabled='.($showdisabled ? 0 : 1),'action'),
+ '?showdisabled='.($showdisabled ? 0 : 1),null),
']', SPACE));
$cmbGroup = new CComboBox("groupid",$_REQUEST["groupid"],"submit();");
diff --git a/frontends/php/js/common.js b/frontends/php/js/common.js
index 48cc7c1a..2b3bc433 100644
--- a/frontends/php/js/common.js
+++ b/frontends/php/js/common.js
@@ -305,7 +305,7 @@ function ScaleChartToParenElement(obj_name)
function insert_sizeable_graph(graph_id,url){
if(isset(ZBX_G_WIDTH)) url += "&amp;width="+ZBX_G_WIDTH;
- document.write('<img id="'+graph_id+'" src="'+url+'" alt="graph" /><br /><br />');
+ document.write('<img id="'+graph_id+'" src="'+url+'" alt="graph" /><br />');
}
function remove_childs(form_name,rmvbyname,tag){
diff --git a/frontends/php/js/scrollbar.js b/frontends/php/js/scrollbar.js
index 3482c1d2..b494b3d6 100644
--- a/frontends/php/js/scrollbar.js
+++ b/frontends/php/js/scrollbar.js
@@ -436,6 +436,7 @@ barmovetoX: function(x){
this.bar.setStyle({left: (x+17) +'px'});
this.settabinfo(x);
+ if(IE) this.bar.setStyle({width: this.barW +'px'});
},
//-------------------------------
diff --git a/frontends/php/locales.php b/frontends/php/locales.php
index d17f776a..bef17b1b 100644
--- a/frontends/php/locales.php
+++ b/frontends/php/locales.php
@@ -250,21 +250,21 @@ else{
foreach($ZBX_LOCALES as $id => $name){
$cmbLang->AddItem($id,$name);
}
- $frmLcls->AddRow('Take for default locale:',$cmbLang);
+ $frmLcls->AddRow('Take for default locale',$cmbLang);
$cmbExtLang = new CComboBox('extlang',get_request('extlang','new'));
$cmbExtLang->AddItem('new',S_CREATE.SPACE.S_NEW_SMALL);
foreach($ZBX_LOCALES as $id => $name){
$cmbExtLang->AddItem($id,$name);
}
- $frmLcls->AddRow('Locale to extend:',$cmbExtLang);
+ $frmLcls->AddRow('Locale to extend',$cmbExtLang);
$cmbFill = new CComboBox('fill',get_request('fill',1));
$cmbFill->AddItem('0',S_DO_NOT_ADD);
$cmbFill->AddItem('1',S_LEAVE_EMPTY);
$cmbFill->AddItem('2',S_FILL_WITH_DEFAULT_VALUE);
- $frmLcls->AddRow('New entries:', $cmbFill);
+ $frmLcls->AddRow('New entries', $cmbFill);
$frmLcls->AddItemToBottomRow(new CButton('next',S_NEXT));
$frmLcls->Show();
diff --git a/frontends/php/profile.php b/frontends/php/profile.php
index 6f46601b..8ba8e9b7 100644
--- a/frontends/php/profile.php
+++ b/frontends/php/profile.php
@@ -41,6 +41,7 @@ include_once "include/page_header.php";
"password1"=> array(T_ZBX_STR, O_OPT, null, null, 'isset({save})&&isset({form})&&({form}!="update")&&isset({change_password})'),
"password2"=> array(T_ZBX_STR, O_OPT, null, null, 'isset({save})&&isset({form})&&({form}!="update")&&isset({change_password})'),
"lang"=> array(T_ZBX_STR, O_OPT, null, NOT_EMPTY, 'isset({save})'),
+ "theme"=> array(T_ZBX_STR, O_OPT, null, NOT_EMPTY, 'isset({save})'),
"autologout"=> array(T_ZBX_INT, O_OPT, null, BETWEEN(0,3600),'isset({save})'),
"url"=> array(T_ZBX_STR, O_OPT, null, null, 'isset({save})'),
"refresh"=> array(T_ZBX_INT, O_OPT, null, BETWEEN(0,3600),'isset({save})'),
@@ -72,7 +73,7 @@ include_once "include/page_header.php";
}
elseif($_REQUEST["password1"]==$_REQUEST["password2"])
{
- $result=update_user_profile($USER_DETAILS["userid"],$_REQUEST["password1"],$_REQUEST["url"],$_REQUEST["autologout"],$_REQUEST["lang"],$_REQUEST["refresh"]);
+ $result=update_user_profile($USER_DETAILS["userid"],$_REQUEST["password1"],$_REQUEST["url"],$_REQUEST["autologout"],$_REQUEST["lang"],$_REQUEST['theme'],$_REQUEST["refresh"]);
show_messages($result, S_USER_UPDATED, S_CANNOT_UPDATE_USER);
if($result)
add_audit(AUDIT_ACTION_UPDATE,AUDIT_RESOURCE_USER,
diff --git a/frontends/php/styles/bar.css b/frontends/php/styles/bar.css
index 7268f375..925cff07 100644
--- a/frontends/php/styles/bar.css
+++ b/frontends/php/styles/bar.css
@@ -65,7 +65,7 @@ img#scroll_calendar:hover{
div#scrolltableft{
position:absolute;
- top: -14px;
+ top: -15px;
left: 18px;
font-family:Verdana, Arial, Helvetica, sans-serif;
font-size:10px;
@@ -75,7 +75,7 @@ div#scrolltableft{
div#scrolltabright{
position:absolute;
- top: -13px;
+ top: -15px;
right: 0px;
font-family:Verdana, Arial, Helvetica, sans-serif;
font-size:10px;
@@ -91,6 +91,10 @@ div#scroll_left{
float: left;
}
+div#scroll_left:hover{
+ cursor:pointer;
+}
+
div#scroll_right{
background-image: url(../images/general/bar/right.gif);
background-repeat:no-repeat;
@@ -99,6 +103,10 @@ div#scroll_right{
float: left;
}
+div#scroll_right:hover{
+ cursor:pointer;
+}
+
div#scroll_middle{
background-image: url(../images/general/bar/bg.gif);
height: 17px;
@@ -111,6 +119,11 @@ div#scroll_bar{
left: 17px;
}
+div#scroll_bar:hover{
+ cursor:pointer;
+}
+
+
div#arrow_l{
position:absolute;
bottom: 0px;
@@ -121,6 +134,10 @@ div#arrow_l{
height:17px;
}
+div#arrow_l:hover{
+ cursor:pointer;
+}
+
div#arrow_r{
position:absolute;
bottom: 0px;
@@ -131,6 +148,10 @@ div#arrow_r{
height:17px;
}
+div#arrow_r:hover{
+ cursor:pointer;
+}
+
div#bar_left{
background-image: url(../images/general/bar/bar_left.gif);
background-repeat:no-repeat;
diff --git a/frontends/php/styles/css_bb.css b/frontends/php/styles/css_bb.css
new file mode 100644
index 00000000..20d8dd67
--- /dev/null
+++ b/frontends/php/styles/css_bb.css
@@ -0,0 +1,247 @@
+/* CSS Document */
+/* Black and Blue Theme by Aly*/
+
+body{
+ background-color:#353535;
+}
+.delimiter{
+ color:#AAF;
+}
+
+.pum_oheader {
+ background: #5C7099 url('../images/gradients/table_head2_bb.gif') repeat-x top left;
+}
+
+.right_header {
+ border-color: #222;
+}
+
+
+
+/*//////////////// LINKS ////////////////////*/
+
+a.highlight { font-family: Verdana, Arial, sans-serif; font-size:10px; font-weight: bold; }
+a.highlight:link { text-decoration: none; color: #ffffff; }
+a.highlight:visited { text-decoration: none; color: #ffffff; }
+a.highlight:hover { text-decoration:none; color: #0AF; }
+
+
+
+A.enabled:link { color:#00AA00; text-decoration: none; }
+A.enabled:visited { color:#00AA00; text-decoration: none; }
+A.enabled:hover { color:#00AA00; text-decoration: underline; }
+A.enabled:active { color:#00AA00; text-decoration: underline;}
+
+A.disabled:link { color:#AA0000; text-decoration: none; }
+A.disabled:visited { color:#AA0000; text-decoration: none; }
+A.disabled:hover { color:#AA0000; text-decoration: underline; }
+A.disabled:active { color:#AA0000; text-decoration: underline;}
+
+A.orange:link { color:#EE7000; text-decoration: none; }
+A.orange:visited { color:#EE7000; text-decoration: none; }
+A.orange:hover { color:#EE7000; text-decoration: underline; }
+A.orange:active { color:#EE7000; text-decoration: underline;}
+
+A.unknown:link { color:#777777; text-decoration: none; }
+A.unknown:visited { color:#777777; text-decoration: none; }
+A.unknown:hover { color:#AAAAAA; text-decoration: underline; }
+A.unknown:active { color:#777777; text-decoration: underline;}
+
+A.off:link { color:#00AA00; text-decoration: none; }
+A.off:visited { color:#00AA00; text-decoration: none; }
+A.off:hover { color:#00AA00; text-decoration: underline; }
+A.off:active { color:#00AA00; text-decoration: underline;}
+
+A.on:link { color:#AA0000; text-decoration: none; }
+A.on:visited { color:#AA0000; text-decoration: none; }
+A.on:hover { color:#AA0000; text-decoration: underline; }
+A.on:active { color:#AA0000; text-decoration: underline;}
+
+
+A.action:link { color:#3C3089; text-decoration: none; }
+A.action:visited { color:#3C3089; text-decoration: none; }
+A.action:hover { color:#3C3089; text-decoration: underline; }
+A.action:active { color:#3C3089; text-decoration: underline;}
+
+A.small_font {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:8pt;}
+/*
+A.small_font {color: #DDD; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:8pt;}
+A.small_font:link {color: #DDD; text-decoration: none; }
+A.small_font:visited {color: #DDD; text-decoration: none; }
+A.small_font:hover {color: #FFF; text-decoration: underline;}
+A.small_font:active {color: #FFF; text-decoration: underline;}
+*/
+
+A.footer {color:#CCCCCC;}
+
+A {font-family:Verdana, Arial, Helvetica, sans-serif;font-size:8pt;}
+A:link {color:black; text-decoration: none; }
+A:visited {color:black; text-decoration: none; }
+A:hover {color:black; text-decoration: underline; }
+A:active {color:black; text-decoration: underline;}
+
+
+A.history:link { color:#28F; text-decoration: none; font-size:10px;}
+A.history:visited { color:#28F; text-decoration: none; font-size:10px;}
+A.history:hover { color:#2FF; text-decoration: none; font-size:10px;}
+A.history:active { color:#28F; text-decoration: none; font-size:10px;}
+
+/*//////////////// TABLES ////////////////////*/
+table.page_header tr td.page_header_r{
+/*
+ background-position:right;
+ background-image: url('../images/gradients/gradient.png');
+ background-repeat:repeat-y;
+*/
+}
+
+table.page_footer{
+ background: #5C7099 url('../images/gradients/table_head_bb.gif') repeat-x top left;
+ border-color: #353535;
+
+ border-top-width: 17px;
+ border-top-style: solid;
+}
+
+table.formtable tr td.form_row_first{
+ background: #5C7099 url('../images/gradients/table_head2_bb.gif') repeat-x top left;
+ border-color: #222;
+}
+
+table.formtable tr td.form_row_last {
+ background: #5C7099 url('../images/gradients/table_head2_bb.gif') repeat-x top left;
+ border-color: #222;
+}
+
+table.formtable tr td.form_row_l { /* left cell */
+ border-color: #222;
+}
+
+table.formtable tr td.form_row_c { /* center cell */
+ border-color: #222;
+}
+
+table.formtable tr td.form_row_r { /* right cell */
+ border-color: #222;
+}
+
+td.form_row_l_simple { /* left cell simple */
+ border-color: #222;
+}
+
+td.form_row_r_simple { /* right cell simple */
+ border-color: #222;
+}
+
+table.formlongtable tr td.form_row_first
+{
+ background: #5C7099 url('../images/gradients/table_head2_bb.gif') repeat-x top left;
+ border-color: #222;
+}
+table.formlongtable tr td.form_row_last {
+ background: #5C7099 url('../images/gradients/table_head2_bb.gif') repeat-x top left;
+ border-color: #222;
+}
+table.formlongtable tr td.form_row_l { /* left cell */
+ border-color: #222;
+}
+table.formlongtable tr td.form_row_c { /* center cell */
+ border-color: #222;
+}
+table.formlongtable tr td.form_row_r { /* right cell */
+ border-color: #222;
+}
+
+table.tabletree tr.footer td {
+ background: #5C7099 url('../images/gradients/table_head2_bb.gif') repeat-x top left;
+}
+
+table.tableinfo{
+ background-color: #5A5A5A;
+}
+
+table.tableinfo tr.footer td {
+ background: #5C7099 url('../images/gradients/table_head2_bb.gif') repeat-x top left;
+}
+
+table.header{
+ background: #5C7099 url('../images/gradients/table_head2_bb.gif') repeat-x top left;
+}
+
+table.ack_msgs tr.title {
+ background: #5C7099 url('../images/gradients/table_head2_bb.gif') repeat-x top left;
+}
+
+table.menu tr{
+ background: #AAAAAA url('../images/gradients/menu_not_active_bb.gif') repeat-x top left;
+}
+
+table.menu td{
+ border-color: #777777;
+}
+
+table.menu tr td.active{
+ background: #5C7099 url('../images/gradients/table_head_bb.gif') repeat-x top left;
+}
+
+table.sub_menu tr{
+ background: #5C7099 url('../images/gradients/table_head_bb.gif') repeat-x top left;
+}
+
+table.sub_menu tr td span.active a.highlight{
+ color: #08F;
+}
+
+table.triggers_info tr td.header {
+ background: #5C7099 url('../images/gradients/table_head2_bb.gif') repeat-x top left;
+}
+
+table.hosts_info tr td.header {
+ background: #5C7099 url('../images/gradients/table_head2_bb.gif') repeat-x top left;
+}
+
+
+table.server_info tr td.header {
+ background: #5C7099 url('../images/gradients/table_head2_bb.gif') repeat-x top left;
+}
+
+table.history td.caption{
+ color:#0AF;
+}
+
+table.tableinfo tr td.normal { background-color: #AADDDD; border: 1px #AADDAA solid; }
+table.tableinfo tr:hover td.normal { background-color: #AACCCC; border: 1px #AAD9AA solid; }
+
+table.tableinfo tr td.average { background-color: #DDAAAA; border: 1px #DDAAAA solid; }
+table.tableinfo tr:hover td.average { background-color: #DD9999; border: 1px #D8A5AA solid; }
+
+
+/*//////////////// DIVS ////////////////////*/
+
+div.zabbix_logo{
+ height: 31px;
+ width: 118px;
+ background-image:url('../images/general/zabbix_bb.png');
+ background-repeat: no-repeat;
+}
+
+div#scrolltableft{
+ color: #0CF;
+}
+
+div#scrolltabright{
+ color: #0CF;
+}
+
+/*//////////////// PARAGRAPHS ////////////////////*/
+
+p.msgerror { color: #CC0000; }
+p.msgok { color: #0088FF; }
+
+
+/*//////////////// FORMS ////////////////////*/
+
+.button:hover {
+ border-color: #000;
+ color: #00F;
+} \ No newline at end of file
diff --git a/frontends/php/styles/css_ob.css b/frontends/php/styles/css_ob.css
new file mode 100644
index 00000000..6d6da67a
--- /dev/null
+++ b/frontends/php/styles/css_ob.css
@@ -0,0 +1 @@
+/* CSS Document */ \ No newline at end of file
diff --git a/frontends/php/styles/default.css b/frontends/php/styles/default.css
new file mode 100644
index 00000000..bfad6714
--- /dev/null
+++ b/frontends/php/styles/default.css
@@ -0,0 +1,170 @@
+/* CSS Document */
+/*
+** ZABBIX
+** Copyright (C) 2000-2007 SIA Zabbix
+**
+** This program is free software; you can redistribute it and/or modify
+** it under the terms of the GNU General Public License as published by
+** the Free Software Foundation; either version 2 of the License, or
+** (at your option) any later version.
+**
+** This program is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+** GNU General Public License for more details.
+**
+** You should have received a copy of the GNU General Public License
+** along with this program; if not, write to the Free Software
+** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+**
+*/
+
+body{
+ background-color:#e5e5e5;
+ margin: 0px;
+ padding: 0px;
+ color:black;
+ font-family:verdana, arial, helvetica, sans-serif;
+ font-size:10px;
+ text-decoration: none;
+ line-height:16px;
+}
+
+/**************** MEDIA *****************/
+@media print {
+ div.printless{
+ visibility: hidden;
+ display: none;
+ }
+ div.printonly{
+ display: block;
+ visibility:visible;
+ }
+}
+
+@media screen {
+ div.printless{
+ visibility:visible;
+ display:block;
+ }
+ div.printonly{
+ visibility: hidden;
+ display:none;
+ }
+}
+
+/**************** OTHERS ****************/
+.top { vertical-align: top; }
+.footer { color:#CCCCCC; }
+
+.enabled { color: #00AA00; }
+.disabled { color: #AA0000; }
+.unknown { color: #AAAAAA; }
+.on { color: #AA0000; }
+.off { color: #00AA00; }
+
+.disaster { background-color: #FF0000; }
+.high { background-color: #FF8888; }
+.average { background-color: #DDAAAA; }
+.warning { background-color: #EFEFCC; }
+.information { background-color: #CCE2CC; }
+.unknown_trigger{ background-color: #BCBCBC; }
+.normal { background-color: #AADDAA; }
+
+.img { border-color:black; border-width:1px; }
+img.top { vertical-align:text-top }
+img.bottom { vertical-align:text-bottom }
+
+.center{
+ width: 100%;
+ text-align: center;
+}
+
+.vert{
+ width:1px;
+ /*writing-mode: tb-rl;*/
+}
+
+.rarr{
+ font-size: 16px;
+}
+
+.bold {
+ font-weight: bold;
+}
+
+.nowrap {
+ white-space: nowrap;
+ word-spacing: 0px;
+}
+
+.delimiter{
+ font-weight:bold;
+ color:#000;
+}
+
+/**************** HINT BOX *****************/
+
+#hint_box {
+ top: 0;
+ z-index: 100;
+ position: absolute;
+ background-color: #FFFFE0;
+ padding: 2px;
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ font-size: 8pt;
+ line-height:15px;
+ border: 1px solid black;
+ border-left: none;
+ border-top: none;
+ visibility: hidden;
+}
+
+/************** END OF HINT BOX ************/
+
+/************** COLOR PICKER ***************/
+#color_picker {
+ top: 0;
+ z-index: 100;
+ position: absolute;
+ background-color: white;
+ padding: 2px;
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ font-size: 10px;
+ line-height:15px;
+ border: 1px solid black;
+}
+
+#color_picker table tr td {
+ margin: 0px;
+ padding: 2px;
+}
+
+#color_picker a {
+ text-decoration: none;
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ font-size: 10px;
+ padding: 0px;
+ margin: 0px;
+}
+
+/************ END OF COLOR PICKER ***********/
+
+/************** DISCOVERY STATUS ************/
+.dhosts_active {
+ padding: 5px;
+ text-align: center;
+ color: #0FA00F;
+}
+.dhosts_disabled {
+ padding: 5px;
+ text-align: center;
+ color: #A00F0F;
+}
+.dservice_active {
+ background: #0FA00F;
+}
+.dservice_disabled {
+ background: #A00F0F;
+}
+/********** END OF DISCOVERY STATUS *********/
diff --git a/frontends/php/styles/div.css b/frontends/php/styles/div.css
index af66ab97..1824b75c 100644
--- a/frontends/php/styles/div.css
+++ b/frontends/php/styles/div.css
@@ -4,12 +4,14 @@ div.disaster{
background-color: #FF0000;
width: 100%;
height: 100%;
+ padding-left: 2px;
margin-right: 5px;
}
div.high{
background-color: #FF8888;
width: 100%;
height: 100%;
+ padding-left: 2px;
margin-right: 5px;
}
@@ -17,15 +19,23 @@ div.average{
background-color: #DDAAAA;
width: 100%;
height: 100%;
+ padding-left: 2px;
margin-right: 5px;
}
div.warning{
background-color: #EFEFCC;
width: 100%;
height: 100%;
+ padding-left: 2px;
margin-right: 5px;
}
+div.zabbix_logo{
+ height: 31px;
+ width: 118px;
+ background: #FFFFFF url('../images/general/zabbix.png') no-repeat;
+}
+
span.footer_sign{
padding-right: 5px;
padding-left: 5px;
diff --git a/frontends/php/styles/link.css b/frontends/php/styles/link.css
index 7d4d35c1..14fcaabc 100644
--- a/frontends/php/styles/link.css
+++ b/frontends/php/styles/link.css
@@ -1,66 +1,66 @@
-/* CSS Document */
-
-a.highlight { font-family: Verdana, Arial, sans-serif; font-size:10px; font-weight: bold; }
-a.highlight:link { text-decoration: none; color: #ffffff; }
-a.highlight:visited { text-decoration: none; color: #ffffff; }
-a.highlight:hover { text-decoration: underline; color: #ffcc00; }
-
-
-
-A.enabled:link { color:#00AA00; text-decoration: none; }
-A.enabled:visited { color:#00AA00; text-decoration: none; }
-A.enabled:hover { color:#00AA00; text-decoration: underline; }
-A.enabled:active { color:#00AA00; text-decoration: underline;}
-
-A.disabled:link { color:#AA0000; text-decoration: none; }
-A.disabled:visited { color:#AA0000; text-decoration: none; }
-A.disabled:hover { color:#AA0000; text-decoration: underline; }
-A.disabled:active { color:#AA0000; text-decoration: underline;}
-
-A.orange:link { color:#EE7000; text-decoration: none; }
-A.orange:visited { color:#EE7000; text-decoration: none; }
-A.orange:hover { color:#EE7000; text-decoration: underline; }
-A.orange:active { color:#EE7000; text-decoration: underline;}
-
-A.unknown:link { color:#AAAAAA; text-decoration: none; }
-A.unknown:visited { color:#AAAAAA; text-decoration: none; }
-A.unknown:hover { color:#AAAAAA; text-decoration: underline; }
-A.unknown:active { color:#AAAAAA; text-decoration: underline;}
-
-A.off:link { color:#00AA00; text-decoration: none; }
-A.off:visited { color:#00AA00; text-decoration: none; }
-A.off:hover { color:#00AA00; text-decoration: underline; }
-A.off:active { color:#00AA00; text-decoration: underline;}
-
-A.on:link { color:#AA0000; text-decoration: none; }
-A.on:visited { color:#AA0000; text-decoration: none; }
-A.on:hover { color:#AA0000; text-decoration: underline; }
-A.on:active { color:#AA0000; text-decoration: underline;}
-
-A.action:link { color:#3C3089; text-decoration: none; }
-A.action:visited { color:#3C3089; text-decoration: none; }
-A.action:hover { color:#3C3089; text-decoration: underline; }
-A.action:active { color:#3C3089; text-decoration: underline;}
-
-a.small_font
-{
- color: #000000;
- font-family: Verdana, Arial, Helvetica, sans-serif;
- font-size: 8pt;
-}
-
-A.footer
-{
- color:#CCCCCC;
-}
-
-A {font-family:Verdana, Arial, Helvetica, sans-serif;font-size:8pt;}
-A:link {color:black; text-decoration: none; }
-A:visited {color:black; text-decoration: none; }
-A:hover {color:black; text-decoration: underline; }
-A:active {color:black; text-decoration: underline;}
-
-A.history:link { color:#448; text-decoration: none; font-size:10px;}
-A.history:visited { color:#448; text-decoration: none; font-size:10px;}
-A.history:hover { color:#448; text-decoration: underline; font-size:10px;}
+/* CSS Document */
+
+a.highlight { font-family: Verdana, Arial, sans-serif; font-size:10px; font-weight: bold; }
+a.highlight:link { text-decoration: none; color: #ffffff; }
+a.highlight:visited { text-decoration: none; color: #ffffff; }
+a.highlight:hover { text-decoration: underline; color: #ffcc00; }
+
+
+
+A.enabled:link { color:#00AA00; text-decoration: none; }
+A.enabled:visited { color:#00AA00; text-decoration: none; }
+A.enabled:hover { color:#00AA00; text-decoration: underline; }
+A.enabled:active { color:#00AA00; text-decoration: underline;}
+
+A.disabled:link { color:#AA0000; text-decoration: none; }
+A.disabled:visited { color:#AA0000; text-decoration: none; }
+A.disabled:hover { color:#AA0000; text-decoration: underline; }
+A.disabled:active { color:#AA0000; text-decoration: underline;}
+
+A.orange:link { color:#EE7000; text-decoration: none; }
+A.orange:visited { color:#EE7000; text-decoration: none; }
+A.orange:hover { color:#EE7000; text-decoration: underline; }
+A.orange:active { color:#EE7000; text-decoration: underline;}
+
+A.unknown:link { color:#777777; text-decoration: none; }
+A.unknown:visited { color:#777777; text-decoration: none; }
+A.unknown:hover { color:#AAAAAA; text-decoration: underline; }
+A.unknown:active { color:#777777; text-decoration: underline;}
+
+A.off:link { color:#00AA00; text-decoration: none; }
+A.off:visited { color:#00AA00; text-decoration: none; }
+A.off:hover { color:#00AA00; text-decoration: underline; }
+A.off:active { color:#00AA00; text-decoration: underline;}
+
+A.on:link { color:#AA0000; text-decoration: none; }
+A.on:visited { color:#AA0000; text-decoration: none; }
+A.on:hover { color:#AA0000; text-decoration: underline; }
+A.on:active { color:#AA0000; text-decoration: underline;}
+
+A.action:link { color:#3C3089; text-decoration: none; }
+A.action:visited { color:#3C3089; text-decoration: none; }
+A.action:hover { color:#3C3089; text-decoration: underline; }
+A.action:active { color:#3C3089; text-decoration: underline;}
+
+a.small_font
+{
+ color: #000000;
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ font-size: 8pt;
+}
+
+A.footer
+{
+ color:#CCCCCC;
+}
+
+A {font-family:Verdana, Arial, Helvetica, sans-serif;font-size:8pt;}
+A:link {color:black; text-decoration: none; }
+A:visited {color:black; text-decoration: none; }
+A:hover {color:black; text-decoration: underline; }
+A:active {color:black; text-decoration: underline;}
+
+A.history:link { color:#448; text-decoration: none; font-size:10px;}
+A.history:visited { color:#448; text-decoration: none; font-size:10px;}
+A.history:hover { color:#448; text-decoration: underline; font-size:10px;}
A.history:active { color:#448; text-decoration: underline; font-size:10px;} \ No newline at end of file
diff --git a/frontends/php/styles/p.css b/frontends/php/styles/p.css
index fe6a0f9c..f2982bd4 100644
--- a/frontends/php/styles/p.css
+++ b/frontends/php/styles/p.css
@@ -1,29 +1,32 @@
-/* CSS Document */
-
-
-P {font-family:Verdana, Arial, Helvetica, sans-serif;font-size:8pt; }
-P:link {color:black; text-decoration: underline; }
-P:visited {color:black; text-decoration: none; }
-P:hover {color:black; text-decoration: none;}
-P:active {color:black; text-decoration: none;}
-
-p.uppercase {text-transform: uppercase}
-p.margin {margin-left: 10pt}
-
-p.info
-{
- font-family: Verdana, Arial, Helvetica, sans-serif;
- font-size: 8pt;
- border: 1px dashed #000000;
- color:#000000;
- background-color: #FFFFFF;
-}
-
-p.error
-{
- font-family: Verdana, Arial, Helvetica, sans-serif;
- font-size: 8pt;
- border: 1px dashed #000000;
- color:#AA0000;
- background-color: #FEFEFE;
+/* CSS Document */
+
+
+P {font-family:Verdana, Arial, Helvetica, sans-serif;font-size:8pt; }
+P:link {color:black; text-decoration: underline; }
+P:visited {color:black; text-decoration: none; }
+P:hover {color:black; text-decoration: none;}
+P:active {color:black; text-decoration: none;}
+
+p.uppercase {text-transform: uppercase}
+p.margin {margin-left: 10pt}
+
+p.msgerror { color: #CC0000; }
+p.msgok { color: #223344; }
+
+p.info
+{
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ font-size: 8pt;
+ border: 1px dashed #000000;
+ color:#000000;
+ background-color: #FFFFFF;
+}
+
+p.error
+{
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ font-size: 8pt;
+ border: 1px dashed #000000;
+ color:#AA0000;
+ background-color: #FEFEFE;
} \ No newline at end of file
diff --git a/frontends/php/styles/table.css b/frontends/php/styles/table.css
index c7db1303..2d95161c 100644
--- a/frontends/php/styles/table.css
+++ b/frontends/php/styles/table.css
@@ -58,25 +58,24 @@ table.page_footer
background: #5C7099 url('../images/gradients/table_head.gif') repeat-x top left;
border-color: #000000;
font-weight: bold;
- border-width:0px;
+
+ border-color: #E5E5E5;
+
+ border-top-width: 17px;
border-top-style: solid;
- border-left-style: solid;
- border-right-style: solid;
- border-bottom-style: solid;
- margin-top: 15px;
width: 100%;
}
table.page_footer tr td.page_footer_l
{
- font-family:verdana, arial, helvetica, sans-serif;
- font-size:10px;
+ font-family:verdana, arial, helvetica, sans-serif;
+ font-size:10px;
height: 24px;
text-align: center;
}
table.page_footer tr td.page_footer_r
{
- font-family:verdana, arial, helvetica, sans-serif;
- font-size:10px;
+ font-family:verdana, arial, helvetica, sans-serif;
+ font-size:10px;
height: 24px;
text-align: right;
}
diff --git a/frontends/php/triggers.php b/frontends/php/triggers.php
index f266a5d4..7c94c835 100644
--- a/frontends/php/triggers.php
+++ b/frontends/php/triggers.php
@@ -310,7 +310,7 @@ include_once "include/page_header.php";
$r_form->SetMethod('get');
$r_form->AddItem(array('[',
new CLink($showdisabled ? S_HIDE_DISABLED_TRIGGERS : S_SHOW_DISABLED_TRIGGERS,
- 'triggers.php?showdisabled='.($showdisabled ? 0 : 1),'action'),
+ 'triggers.php?showdisabled='.($showdisabled ? 0 : 1),NULL),
']', SPACE));
$cmbGroup = new CComboBox("groupid",$_REQUEST["groupid"],"submit()");
diff --git a/frontends/php/users.php b/frontends/php/users.php
index d3d06a4d..db4712f1 100644
--- a/frontends/php/users.php
+++ b/frontends/php/users.php
@@ -61,6 +61,7 @@ include_once "include/page_header.php";
'enable_media'=>array(T_ZBX_INT, O_OPT, null, null, null),
'disable_media'=>array(T_ZBX_INT, O_OPT,null, null, null),
'lang'=> array(T_ZBX_STR, O_OPT, null, NOT_EMPTY, '(isset({config})&&({config}==0))&&isset({save})'),
+ 'theme'=> array(T_ZBX_STR, O_OPT, null, NOT_EMPTY, '(isset({config})&&({config}==0))&&isset({save})'),
'autologout'=> array(T_ZBX_INT, O_OPT, null, BETWEEN(0,3600),'(isset({config})&&({config}==0))&&isset({save})'),
'url'=> array(T_ZBX_STR, O_OPT, null, null, '(isset({config})&&({config}==0))&&isset({save})'),
'refresh'=> array(T_ZBX_INT, O_OPT, null, BETWEEN(0,3600),'(isset({config})&&({config}==0))&&isset({save})'),
@@ -178,7 +179,7 @@ include_once "include/page_header.php";
$result=update_user($_REQUEST["userid"],
$_REQUEST["name"],$_REQUEST["surname"],$_REQUEST["alias"],
$_REQUEST["password1"],$_REQUEST["url"],$_REQUEST["autologout"],
- $_REQUEST["lang"],$_REQUEST["refresh"],$_REQUEST["user_type"],
+ $_REQUEST["lang"],$_REQUEST['theme'],$_REQUEST["refresh"],$_REQUEST["user_type"],
$user_groups, $user_medias);
show_messages($result, S_USER_UPDATED, S_CANNOT_UPDATE_USER);
@@ -187,7 +188,7 @@ include_once "include/page_header.php";
$result=add_user(
$_REQUEST["name"],$_REQUEST["surname"],$_REQUEST["alias"],
$_REQUEST["password1"],$_REQUEST["url"],$_REQUEST["autologout"],
- $_REQUEST["lang"],$_REQUEST["refresh"],$_REQUEST["user_type"],
+ $_REQUEST["lang"],$_REQUEST['theme'],$_REQUEST["refresh"],$_REQUEST["user_type"],
$user_groups, $user_medias);
show_messages($result, S_USER_ADDED, S_CANNOT_ADD_USER);