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

113 lines
4.1 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;
if (!isset($this->section[0])) {
return JError::raiseError( 404, JText::_( 'Document not found') );
}
global $mainframe;
$mainframe->appendPathWay($this->section[0]->title, JRoute::_('index.php?option=com_sql2excel&view=section&id=' . $this->section[0]->id . ':' . $this->section[0]->alias . '&Itemid=' . JRequest::getVar('Itemid', 1, 'get', 'int')));
?>
<div id="sql2excel-section-box"><?php
echo '<div class="sql2excel-section"><div class="sql2exceltop"><a title="'.JText::_('Sections').'" href="'. JRoute::_('index.php?option=com_sql2excel&view=sections'.'&Itemid='. JRequest::getVar('Itemid', 1, 'get', 'int')).'" >'.JHTML::_('image', 'components/com_sql2excel/assets/images/up.png', JText::_('Up'),'border=0'). '</a></div>';
echo '<h3>'.$this->section[0]->title. '</h3>';
// Description
echo '<div class="contentpane'.$this->cmpparams->get( 'pageclass_sfx' ).'">';
if ( $this->show_sect_descr && (isset($this->section[0]->description) && $this->section[0]->description != '')) {
echo '<div class="contentdescription'.$this->cmpparams->get( 'pageclass_sfx' ).'">';
if ( isset($this->tmpl['image']) ) {
echo $this->tmpl['image'];
}
echo $this->section[0]->description
.'</div><p>&nbsp;</p>';
}
echo '</div>';
if (!empty($this->categorylist)) {
foreach ($this->categorylist as $valueCat) {
echo '<p class="sql2excel-category">';
echo '<a href="'. JRoute::_('index.php?option=com_sql2excel&view=category&id='.$valueCat->id.'&Itemid='. JRequest::getVar('Itemid', 1, 'get', 'int')).'">'. $valueCat->title.'</a>';
echo ' <small>('.$valueCat->numdoc.')</small></p>' . "\n";
}
echo '</div>';
} else {
echo '<p>&nbsp;</p><p>&nbsp;</p>';
echo '</div>';
}
?></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="pd-document" '.$imageFileName.'>';
echo '<a href="'. JRoute::_('index.php?option=com_sql2excel&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>';
}
?>