<?php
/**
 * Maintenance log
 *
 * @package 	CSVIVirtueMart
 * @subpackage 	Maintenance
 * @author 		Roland Dalmulder
 * @link 		http://www.csvimproved.com
 * @copyright 	Copyright (C) 2006 - 2012 RolandD Cyber Produksi
 * @license 	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 * @version 	$Id: log.php 1892 2012-02-11 11:01:09Z RolandD $
 */
 
defined( '_JEXEC' ) or die( 'Direct Access to this location is not allowed.' );
if ($this->logresult) {
	?>
	<table class="adminlist">
	<thead>
	<tr>
		<th class="title" colspan="3"><?php echo JText::_('COM_CSVIVIRTUEMART_'.$this->logresult['action_type']); ?></th>
	</tr>
	<tr>
		<th class="title">
		<?php echo JText::_('COM_CSVIVIRTUEMART_LOG_ACTION'); ?>
		</th>
		<th class="title">
		<?php echo JText::_('COM_CSVIVIRTUEMART_LOG_RESULT'); ?>
		</th>
		<th class="title">
		<?php echo JText::_('COM_CSVIVIRTUEMART_LOG_MESSAGE'); ?>
		</th>
	</tr>
	</thead>
	<tbody>
	<?php
	if (count($this->logresult['result']) > 0) {
		foreach ($this->logresult['result'] as $result => $log) { ?>
			<tr>
				<td align="center">
					<?php echo $log->total_result; ?>
				</td>
				<td>
					<?php echo $log->result; ?>
				</td>
				<td>
					<?php echo JText::_('COM_CSVIVIRTUEMART_'.$log->status); ?>
				</td>
			</tr>
		<?php }
	}
	else { ?>
		<tr><td colspan="3"><?php echo JText::_('COM_CSVIVIRTUEMART_NO_DETAILS_FOUND'); ?></td></tr>
	<?php }
	?>
	</tbody>
	</table>
	<form action="index.php" method="post" name="adminForm">
		<input type="hidden" name="option" value="com_csvivirtuemart" />
		<input type="hidden" name="task" value="logdetails" />
		<input type="hidden" name="run_id" value="<?php echo $this->logresult['run_id']; ?>" />
		<input type="hidden" id="view" name="view" value="logdetails" />
	</form>
<?php }
else {
	echo JText::sprintf('COM_CSVIVIRTUEMART_MAINTENANCE_RESULT_NO_LOG', JText::_('COM_CSVIVIRTUEMART_'.$this->operation[0].'_LABEL'));
	echo '<br />';
	echo '<br />';
	echo JText::_('COM_CSVIVIRTUEMART_NO_LOG_EXPLAIN');
}
?>
