Beispiel #1
0
						<li>
							<a class="jsn-icon24 jsn-icon-social jsn-icon-twitter" href="http://www.twitter.com/joomlashine" title="Follow us on Twitter" target="_blank"></a>
						</li>
						<li>
							<a class="jsn-icon24 jsn-icon-social jsn-icon-youtube" href="http://www.youtube.com/joomlashine" title="Watch us on YouTube" target="_blank"></a>
						</li>
					</ul>
				</div>
				<div class="clearbreak"></div>
			</div -->
		</div>
	</div>
</div>

<?php 
$backupFile = JSNTplHelper::findLatestBackup($this->data->template);
if (is_file($backupFile)) {
    ?>
<div id="jsn-backup-file" class="row-fluid">
	<div class="span12 alert alert-block alert-warning" style="margin-top:20px">
		<a href="javascript:void(0)" title="<?php 
    echo JText::_('JSN_TPLFW_CLOSE');
    ?>
" class="jsn-close-message close" style="right:0">×</a>
		<span class="label label-important"><?php 
    echo JText::_('JSN_TPLFW_IMPORTANT_INFORMATION');
    ?>
</span>
		<p>
			<?php 
    echo JText::_('JSN_TPLFW_AUTO_UPDATE_INSTALL_DOWNLOAD_BACKUP');
Beispiel #2
0
 /**
  * Create a backup of modified files then force user to download it.
  *
  * @return  void
  */
 public function downloadAction()
 {
     // Import necessary library
     jimport('joomla.filesystem.file');
     if ($isUpdate = JFactory::getApplication()->input->getCmd('type') == 'update') {
         if (is_readable(JFactory::getConfig()->get('tmp_path') . '/jsn-' . $this->template['id'] . '.zip')) {
             $this->backupAction();
         } else {
             $this->setResponse(JSNTplHelper::findLatestBackup($this->template['name']));
         }
     } else {
         $this->backupAction();
     }
     // Get path to backup file
     $path = $this->getResponse();
     // Force user to download backup file
     header('Content-Type: application/octet-stream');
     header('Content-Length: ' . filesize($path));
     header('Content-Disposition: attachment; filename=' . basename($path));
     header('Cache-Control: no-cache, must-revalidate, max-age=60');
     header('Expires: Sat, 01 Jan 2000 12:00:00 GMT');
     echo JFile::read($path);
     // Exit immediately
     exit;
 }