| Server IP : 195.130.67.5 / Your IP : 216.73.217.154 Web Server : Microsoft-IIS/10.0 System : Windows NT WEBSERVER1 10.0 build 17763 (Windows Server 2016) i586 User : IUSR ( 0) PHP Version : 7.4.19 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/inetpub/wwwroot/icd/administrator/components/com_akeeba/models/ |
Upload File : |
<?php
/**
* @package AkeebaBackup
* @copyright Copyright (c)2006-2011 Nicholas K. Dionysopoulos
* @license GNU General Public License version 3, or later
* @version $Id: log.php 409 2011-01-24 09:30:22Z nikosdion $
* @since 1.3
*/
// Protect from unauthorized access
defined('_JEXEC') or die('Restricted Access');
jimport('joomla.application.component.model');
/**
* The Control Panel model
*
*/
class AkeebaModelLog extends JModel
{
function getLogFiles()
{
$configuration = AEFactory::getConfiguration();
$outdir = $configuration->get('akeeba.basic.output_directory');
$files = AEUtilScanner::getFiles($outdir);
$ret = array();
if(!empty($files) && is_array($files))
{
foreach($files as $filename)
{
$basename = basename($filename);
if( (substr($basename,0,7) == 'akeeba.') && (substr($basename,-4) == '.log') && ($basename != 'akeeba.log') )
{
$tag = str_replace('akeeba.', '', str_replace('.log', '', $basename));
if(!empty($tag)) $ret[] = $tag;
}
}
}
return $ret;
}
function getLogList()
{
$options = array();
$list = $this->getLogFiles();
if(!empty($list))
{
$options[] = JHTML::_('select.option',null,JText::_('LOG_CHOOSE_FILE_VALUE'));
foreach($list as $item)
{
$text = JText::_('STATS_LABEL_ORIGIN_'.strtoupper($item));
$options[] = JHTML::_('select.option',$item,$text);
}
}
return $options;
}
}