<?php
#
# XiVO Web-Interface
# Copyright (C) 2006-2014  Avencall
#
# 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 3 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, see <http://www.gnu.org/licenses/>.
#

$url      = &$this->get_module('url');
$basedir  = $this->get_var('basedir');
$basename = $this->get_var('basename');
$domain   = $this->get_var('domain');
$graphs   = $this->get_var('graphs');
$graph_captions = $this->get_var('graph_captions');
$freqs    = $this->get_var('freqs');
?>
<div id="sr-users" class="b-infos b-form">
	<h3 class="sb-top xspan">
		<span class="span-left">&nbsp;</span>
		<span class="span-center"><?=$this->bbf('title_content_name');?></span>
		<span class="span-right">&nbsp;</span>
	</h3>
	<div class="sb-content">
<?php
    foreach($graphs as $graph)
    {
?>
        <fieldset>
        <legend>
            <?=$this->bbf($graph_captions[$graph]['caption_id'],
                          $graph_captions[$graph]['caption_argument']);?>
        </legend>
        <div class="sb-list">
<?php
        foreach($freqs as $freq)
        {
            $image = $url->img_html("$basedir/$basename$graph-$freq.png",
                                    "$graph $freq graph",
                                    "class=\"mini\"");
            echo $url->href_html($image,
                                 null,
                                 array("zoom" => "$domain-$graph-$freq"),
                                 null,
                                 $this->bbf("zoom"));
        }
?>
        </div>
        </fieldset>
<?php
    }
?>

    </div>
	<div class="sb-foot xspan">
		<span class="span-left">&nbsp;</span>
		<span class="span-center">&nbsp;</span>
		<span class="span-right">&nbsp;</span>
	</div>
</div>
