3939/* Get the dataType to show */
4040$ dataType = $ _GET ["type " ];
4141
42+ /* Get some translations */
43+ $ monTransDate = $ app ->lng ("monitor_settings_datafromdate_txt " );
44+ $ monTransSrv = $ app ->lng ("monitor_settings_server_txt " );
45+
46+
4247$ output = '' ;
4348
4449switch ($ dataType ) {
4550 case 'server_load ' :
4651 $ template = 'templates/show_data.htm ' ;
4752 $ output .= showServerLoad ();
4853 $ time = getDataTime ('server_load ' );
49- $ title = $ app ->lng ("Server Load " ).' (Server : ' . $ _SESSION ['monitor ' ]['server_name ' ] . ') ' ;
54+ $ title = $ app ->lng ("Server Load " ).' ( ' . $ monTransSrv . ' : ' . $ _SESSION ['monitor ' ]['server_name ' ] . ') ' ;
5055 $ description = '' ;
5156 break ;
5257 case 'disk_usage ' :
5358 $ template = 'templates/show_data.htm ' ;
5459 $ output .= showDiskUsage ();
5560 $ time = getDataTime ('disk_usage ' );
56- $ title = $ app ->lng ("Disk usage " ).' (Server : ' . $ _SESSION ['monitor ' ]['server_name ' ] . ') ' ;
61+ $ title = $ app ->lng ("Disk usage " ).' ( ' . $ monTransSrv . ' : ' . $ _SESSION ['monitor ' ]['server_name ' ] . ') ' ;
5762 $ description = '' ;
5863 break ;
5964 case 'mem_usage ' :
6065 $ template = 'templates/show_data.htm ' ;
6166 $ output .= showMemUsage ();
6267 $ time = getDataTime ('mem_usage ' );
63- $ title = $ app ->lng ("Memory usage " ).' (Server : ' . $ _SESSION ['monitor ' ]['server_name ' ] . ') ' ;
68+ $ title = $ app ->lng ("Memory usage " ).' ( ' . $ monTransSrv . ' : ' . $ _SESSION ['monitor ' ]['server_name ' ] . ') ' ;
6469 $ description = '' ;
6570 break ;
6671 case 'cpu_info ' :
6772 $ template = 'templates/show_data.htm ' ;
6873 $ output .= showCpuInfo ();
6974 $ time = getDataTime ('cpu_info ' );
70- $ title = $ app ->lng ("CPU info " ).' (Server : ' . $ _SESSION ['monitor ' ]['server_name ' ] . ') ' ;
75+ $ title = $ app ->lng ("CPU info " ).' ( ' . $ monTransSrv . ' : ' . $ _SESSION ['monitor ' ]['server_name ' ] . ') ' ;
7176 $ description = '' ;
7277 break ;
7378 case 'services ' :
7479 $ template = 'templates/show_data.htm ' ;
7580 $ output .= showServices ();
7681 $ time = getDataTime ('services ' );
77- $ title = $ app ->lng ("Status of services " ).' (Server : ' . $ _SESSION ['monitor ' ]['server_name ' ] . ') ' ;
82+ $ title = $ app ->lng ("Status of services " ).' ( ' . $ monTransSrv . ' : ' . $ _SESSION ['monitor ' ]['server_name ' ] . ') ' ;
7883 $ description = '' ;
7984 break ;
8085 case 'system_update ' :
8186 $ template = 'templates/show_data.htm ' ;
8287 $ output .= showSystemUpdate ();
8388 $ time = getDataTime ('system_update ' );
84- $ title = " Update State " . ' (Server : ' . $ _SESSION ['monitor ' ]['server_name ' ] . ') ' ;
89+ $ title = $ app -> lng ( " monitor_title_updatestate_txt " ) . ' ( ' . $ monTransSrv . ' : ' . $ _SESSION ['monitor ' ]['server_name ' ] . ') ' ;
8590 $ description = '' ;
8691 break ;
8792 case 'mailq ' :
8893 $ template = 'templates/show_data.htm ' ;
8994 $ output .= showMailq ();
9095 $ time = getDataTime ('mailq ' );
91- $ title = " Mailq " . ' (Server : ' . $ _SESSION ['monitor ' ]['server_name ' ] . ') ' ;
96+ $ title = $ app -> lng ( " monitor_title_mailq_txt " ) . ' ( ' . $ monTransSrv . ' : ' . $ _SESSION ['monitor ' ]['server_name ' ] . ') ' ;
9297 $ description = '' ;
9398 break ;
9499 case 'raid_state ' :
95100 $ template = 'templates/show_data.htm ' ;
96101 $ output .= showRaidState ();
97102 $ time = getDataTime ('raid_state ' );
98- $ title = " RAID-State " . ' (Server : ' . $ _SESSION ['monitor ' ]['server_name ' ] . ') ' ;
103+ $ title = $ app -> lng ( " monitor_title_raidstate_txt " ) . ' ( ' . $ monTransSrv . ' : ' . $ _SESSION ['monitor ' ]['server_name ' ] . ') ' ;
99104 $ description = '' ;
100105 break ;
101106 case 'rkhunter ' :
102107 $ template = 'templates/show_data.htm ' ;
103108 $ output .= showRKHunter ();
104109 $ time = getDataTime ('rkhunter ' );
105- $ title = " RKHunter-Log " . ' (Server : ' . $ _SESSION ['monitor ' ]['server_name ' ] . ') ' ;
110+ $ title = $ app -> lng ( " monitor_title_rkhunterlog_txt " ) . ' ( ' . $ monTransSrv . ' : ' . $ _SESSION ['monitor ' ]['server_name ' ] . ') ' ;
106111 $ description = '' ;
107112 break ;
108113 default :
120125$ app ->tpl ->setVar ("title " , $ title );
121126$ app ->tpl ->setVar ("description " , $ description );
122127$ app ->tpl ->setVar ("time " , $ time );
128+ $ app ->tpl ->setVar ("monTransDate " , $ monTransDate );
123129
124130$ app ->tpl_defaults ();
125131$ app ->tpl ->pparse ();
126- ?>
132+ ?>
0 commit comments