Skip to content

Instantly share code, notes, and snippets.

@anzenehansen
Created May 15, 2014 18:51
Show Gist options
  • Save anzenehansen/01deed70c1cf9327aae9 to your computer and use it in GitHub Desktop.
Save anzenehansen/01deed70c1cf9327aae9 to your computer and use it in GitHub Desktop.
<?php
$graph_keys = array("trafficgraph", "loadgraph", "memorygraph");
$graphs = false;
foreach ($graph_keys as $value) {
if ($this->Html->ifSet($server->{$value}, false)) {
$graphs = true;
break;
}
}
// Display graphs
if ($graphs) {
?>
<hr />
<h4><?php $this->_("Solusvm.tab_client_stats.heading_graphs");?></h4>
<?php
foreach ($graph_keys as $value) {
if (!$this->Html->ifSet($server->{$value}, false))
continue;
?>
<p><img src="<?php echo $this->Html->safe($this->Html->ifSet($module_hostname) . $this->Html->ifSet($server->{$value}));?>" /></p>
<?php
}
}
?>
<?php
$graph_keys = array("trafficgraph", "loadgraph", "memorygraph");
?>
<hr />
<h4><?php $this->_("Solusvm.tab_client_stats.heading_graphs");?></h4>
<?php
foreach ($graph_keys as $value) {
if (!$this->Html->ifSet($server->{$value}, false))
continue;
?>
<p><img src="<?php echo $this->Html->safe($this->Html->ifSet($module_hostname) . $this->Html->ifSet($server->{$value}));?>" /></p>
<?php
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment