| Joomla! | PHP Cross Reference | Web Portals |
1 <?php 2 /** 3 * @package Joomla.Administrator 4 * @subpackage com_banners 5 * 6 * @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved. 7 * @license GNU General Public License version 2 or later; see LICENSE.txt 8 */ 9 10 defined('_JEXEC') or die; 11 12 /** 13 * View class for a list of tracks. 14 * 15 * @package Joomla.Administrator 16 * @subpackage com_banners 17 * @since 1.6 18 */ 19 class BannersViewTracks extends JViewLegacy 20 { 21 /** 22 * Display the view 23 */ 24 public function display($tpl = null) 25 { 26 $basename = $this->get('BaseName'); 27 $filetype = $this->get('FileType'); 28 $mimetype = $this->get('MimeType'); 29 $content = $this->get('Content'); 30 31 // Check for errors. 32 if (count($errors = $this->get('Errors'))) { 33 JError::raiseError(500, implode("\n", $errors)); 34 return false; 35 } 36 37 $document = JFactory::getDocument(); 38 $document->setMimeEncoding($mimetype); 39 JResponse::setHeader('Content-disposition', 'attachment; filename="'.$basename.'.'.$filetype.'"; creation-date="'.JFactory::getDate()->toRFC822().'"', true); 40 echo $content; 41 } 42 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
title