FundacionLQDVI_WebCongresos/www/components/com_sql2excel/views/sections/tmpl/default.php

113 lines
3.6 KiB
PHP

<?php
/*
* @component SQL 2 Excel Pro Component
* @copyright Copyright (C) Joomla-R-Us, joomla-r-us.com
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU/GPLv3
*
* Original code by Jan Pavelka (www.phoca.cz)
* Adapted by Joomla-R-Us for SQl 2 Excel Pro
*
*/
/*
* @package Joomla 1.5
* @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
*
* @component Phoca Component
* @copyright Copyright (C) Jan Pavelka www.phoca.cz
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
*/
// no direct access
defined('_JEXEC') or die('Restricted access');
if ( $this->show_page_title ) : ?>
<div class="componentheading<?php echo $this->cmpparams->get( 'pageclass_sfx' ); ?>">
<?php echo $this->cmpparams->get('page_title'); ?>
</div>
<?php endif; ?>
<div id="sql2excel-sections-box">
<?php
if (!empty($this->sections)) {
$i = 1;
foreach ($this->sections as $value) {
// Categories
$numDoc = 0;
$catOutput = '';
foreach ($value->categories as $valueCat) {
$catOutput .= '<p class="sql2excel-category">';
$catOutput .= '<a href="'. JRoute::_('index.php?option=com_sql2excel&view=category&id='.$valueCat->id.':'.$valueCat->alias.'&Itemid='. JRequest::getVar('Itemid', 1, 'get', 'int')).'">'. $valueCat->title.'</a>';
if ($this->tmpl['displaynumdocsecs'] == 1) {
$catOutput .=' <small>('.$valueCat->numdoc .')</small>';
}
$catOutput .= '</p>' . "\n";
$numDoc = (int)$valueCat->numdoc + (int)$numDoc;
}
echo '<div class="sql2excel-sections"><div><div><div><div><div><h3>';
echo '<a href="'. JRoute::_('index.php?option=com_sql2excel&view=section&id='.$value->id.':'.$value->alias.'&Itemid='. JRequest::getVar('Itemid', 1, 'get', 'int')).'">'. $value->title.'</a>';
if ($this->tmpl['displaynumdocsecsheader'] == 1) {
echo ' <small>('.$value->numcat.'/' . $numDoc .')</small>';
}
echo '</h3></div></div>';
echo $catOutput;
echo '</div></div></div></div>';
if ($i%3==0) {
echo '<div style="clear:both"></div>';
}
$i++;
}
}
?>
</div>
<div style="clear:both"></div>
<?php
if (!empty($this->mostvieweddocs) && $this->tmpl['displaymostdownload'] == 1) {
echo '<div class="sql2excel-hr" style="clear:both">&nbsp;</div>';
echo '<div id="sql2excel-most-viewed-box">';
echo '<div class="sql2excel-workbooks"><h3>'. JText::_('Most downloaded Spreadsheets').'</h3>';
foreach ($this->mostvieweddocs as $value) {
// FILESIZE
if ($value->filename !='') {
$absFile = str_replace('/', DS, JPath::clean($this->absfilepath . $value->filename));
if (JFile::exists($absFile))
{
$fileSize = PhocaDownloadHelper::getFileSizeReadable(filesize($absFile));
} else {
$fileSize = '';
}
}
// IMAGE FILENAME
$imageFileName = '';
if ($value->image_filename !='') {
$thumbnail = false;
$thumbnail = preg_match("/phocathumbnail/i", $value->image_filename);
if ($thumbnail) {
$imageFileName = '';
} else {
$imageFileName = 'style="background: url(\''.$this->cssimagepath.$value->image_filename.'\') 0 center no-repeat;"';
}
}
echo '<p class="sql2excel-document" '.$imageFileName.'>';
echo '<a href="'. JRoute::_('index.php?option=com_phocadownload&view=category&id='.$value->categoryid.':'.$value->categoryalias.'&Itemid='. JRequest::getVar('Itemid', 1, 'get', 'int')).'">'. $value->title.'</a> <small>(' .$value->sectiontitle. '/'.$value->categorytitle.')</small>';
echo PhocaDownloadHelper::displayNewIcon($value->date, $this->tmpl['displaynew']);
echo PhocaDownloadHelper::displayHotIcon($value->hits, $this->tmpl['displayhot']);
echo '</p>' . "\n";
}
echo '</div></div>';
}
?>