<?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');

$zoom    = $this->get_var('zoom');
$prev    = $this->get_var('prev');
$next    = $this->get_var('next');

function bbf_format($ctx, $link)
{
    list($domain, $mod, $freq) = explode('-', $link);
    return $ctx->bbf('title_content_name').' - '.$ctx->bbf($mod).' ('.
        $ctx->bbf('per-'.$freq).')';
}

?>
<div id="sr-users" class="b-infos b-form">
  <breadcrumb
		page="<?=$this->bbf('title_content_name');?>">
	</breadcrumb>
	<div class="sb-content">
<?php
    if(!is_null($prev))
        echo $url->href_html('«'.$url->img_html("$basedir/$basename".substr($prev,strpos($prev,'-')+1).".png",
                null, "class=nav-left"),
            null, array("zoom" => $prev), null, bbf_format($this, $prev)
        );

    echo $url->img_html("$basedir/$basename".substr($zoom,strpos($zoom,'-')+1).".png", "$zoom graph");

    if(!is_null($next))
        echo $url->href_html($url->img_html("$basedir/$basename".substr($next,strpos($next,'-')+1).".png",
                null, "class=nav-right").'»',
            null, array("zoom" => $next), null, bbf_format($this, $next)
        );
?>
    </div>
	<div class="sb-foot xspan"></div>
</div>
