FundacionLQDVI_WebCongresos/www/components/com_sql2excel/views/section/view.html.php

78 lines
2.4 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
*/
// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die();
jimport( 'joomla.application.component.view');
require_once( JPATH_COMPONENT.DS.'helpers'.DS.'parms.php' );
class Sql2excelViewSection extends JView
{
function display($tpl = null)
{
global $mainframe;
$cmpparams = &$mainframe->getParams();
$params = Sql2excelParms::getParms();
$this->assignRef('cmpparams', $cmpparams);
$model = &$this->getModel();
$document = &JFactory::getDocument();
$sectionId = JRequest::getVar('id', 0, '', 'int');
if ( $sectionId < 1 ) {
// Get section id from the menu parameter
$paramsC = JComponentHelper::getParams('com_sql2excel');
$sectionId = $paramsC->get( 'sid', '1' );
}
//$showSectDescr = $params->get( 'show_section_descr', '1' );
$showSectDescr = Sql2excelParms::get($params,'show_section_descr', '1');
//$showPageTitle = $params->get( 'show_ptitle', '1' );
$showPageTitle = Sql2excelParms::get($params,'show_ptitle', '1');
// Template Style
//$style = $params->get( 'style', 'sql2excel-silver-grad' );
$style = Sql2excelParms::get($params,'templatestyle', 'sql2excel-silver-grad');
$document->addStyleSheet(JURI::base(true).'/components/com_sql2excel/assets/css/'.$style.'.css');
$section = $model->getSection($sectionId, $params);
$this->assignRef('section',$section);
$categoryList = $model->getCategoryList($sectionId, $params);
$this->assignRef('categorylist', $categoryList);
$this->assignRef('tmpl', $tmpl);
$section = $model->getSection($sectionId, $params);
$this->assignRef('section', $section);
$this->assignRef('show_sect_descr', $showSectDescr);
$this->assignRef('show_page_title', $showPageTitle);
$this->assignRef('params', $params);
parent::display($tpl);
}
}
?>