initial widescreen version :)

git-svn-id: http://www.observium.org/svn/observer/trunk@2412 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2011-09-04 21:50:48 +00:00
parent 1c65e69268
commit f096b307c4
4 changed files with 31 additions and 4 deletions

View File

@@ -3,6 +3,16 @@
<tr>
<td align="left"></td>
<td align="right">
<?php
if($_SESSION['widescreen'] === 1){
echo('<a href="/?widescreen=no">Switch to Normal Width</a>');
}else{
echo('<a href="/?widescreen=yes">Switch to Widescreen</a>');
}
?>
<?php
if ($_SESSION['authenticated'])
{

View File

@@ -2,12 +2,17 @@
global $config;
if(!$graph_array['height']) { $graph_array['height'] = "100"; }
if(!$graph_array['width']) { $graph_array['width'] = "215"; }
if($_SESSION['widescreen']) {
if(!$graph_array['height']) { $graph_array['height'] = "110"; }
if(!$graph_array['width']) { $graph_array['width'] = "215"; }
} else {
if(!$graph_array['height']) { $graph_array['height'] = "100"; }
if(!$graph_array['width']) { $graph_array['width'] = "215"; }
}
$graph_array['to'] = $config['time']['now'];
$periods = array('day', 'week', 'month', 'year');
$periods = array('sixhour', 'day', 'week', 'month', 'year', 'twoyear');
foreach ($periods as $period)
{

View File

@@ -25,6 +25,12 @@ include("../config.php");
include("../includes/functions.php");
include("includes/functions.inc.php");
include("includes/authenticate.inc.php");
if($_GET['widescreen'] == "yes") { $_SESSION['widescreen'] = 1; }
if($_GET['widescreen'] == "no") { unset($_SESSION['widescreen']); }
$start = utime();
$now = time();
@@ -66,6 +72,11 @@ if ($config['page_refresh']) { echo("<meta http-equiv='refresh' content='".$conf
<link href="<?php echo($config['stylesheet']); ?>" rel="stylesheet" type="text/css" />
<link rel="shortcut icon" href="<?php echo($config['favicon']); ?>" />
<link rel="stylesheet" href="css/mktree.css" type="text/css" />
<?php
if ($_SESSION['widescreen']) { echo('<link rel="stylesheet" href="css/styles-wide.css" type="text/css" />'); }
?>
</head>
<body>
<script type="text/javascript" src="js/mktree.js"></script>
@@ -96,7 +107,6 @@ function popUp(URL)
<?php
include("includes/authenticate.inc.php");
include("includes/".$config['web_header']);
if ($_SESSION['authenticated']) { include("includes/print-menubar.php"); } else { echo('<hr color="#444444" />'); }

View File

@@ -986,6 +986,8 @@ $config['time']['twomonth'] = time() - (2 * 31 * 24 * 60 * 60);
$config['time']['threemonth'] = time() - (3 * 31 * 24 * 60 * 60);
$config['time']['sixmonth'] = time() - (6 * 31 * 24 * 60 * 60);
$config['time']['year'] = time() - (365 * 24 * 60 * 60);
$config['time']['twoyear'] = time() - (2 * 365 * 24 * 60 * 60);
# IPMI sensor type mappings
$config['ipmi_unit']['Volts'] = 'voltage';