<?php
/**
* @version 1.0.0
* @package RSFiles! 1.0.0
* @copyright (C) 2009 www.rsjoomla.com
* @license GPL, http://www.gnu.org/copyleft/gpl.html
*/


defined( '_JEXEC' ) or die( 'Restricted access' ); 
?>
<br/>
<table width="100%">
	<tr>
		<td width="100">
			<a style="text-decoration:none;" href="<?php echo JRoute::_('index.php?option=com_rsfiles&view=files'.$this->itemid); ?>"><img style="vertical-align:middle;" src="<?php echo JURI::root().'components/com_rsfiles/images/icons/home.png'; ?>" alt="<?php echo JText::_('RSFL_HOME'); ?>" /> <?php echo JText::_('RSFL_HOME'); ?></a>
		</td>
		<td width="100">
			<a style="text-decoration:none;" href="javascript:void(0)" onclick="document.rsflform.submit();"><img style="vertical-align:middle;" src="<?php echo JURI::root().'components/com_rsfiles/images/icons/save.png'; ?>" alt="<?php echo JText::_('RSFL_SAVE'); ?>" /> <?php echo JText::_('RSFL_SAVE'); ?></a>
		</td>
		<td width="100">
			<a style="text-decoration:none;" href="<?php echo JRoute::_('index.php?option=com_rsfiles&view=files&layout=download'.$this->currentpath.$this->itemid); ?>"><img style="vertical-align:middle;" src="<?php echo JURI::root().'components/com_rsfiles/images/icons/cancel.png'; ?>" alt="<?php echo JText::_('RSFL_CANCEL'); ?>" /> <?php echo JText::_('RSFL_CANCEL'); ?></a>
		</td>
		<td>&nbsp;</td>
	</tr>
</table>
<br/><br/>
<form name="rsflform" action="<?php echo JRoute::_('index.php?option=com_rsfiles&task=save&controller=files'.$this->itemid,false); ?>" method="post" enctype="multipart/form-data">
<table cellspacing="0" cellpadding="2" border="0" width="100%">
	<tr>
		<td width="200"><label for="FilePath"><?php echo JText::_('RSFL_PUBLISHED'). ':'; ?></label></td>
		<td colspan="2"><?php echo JHTML::_('select.booleanlist','published','class="inputbox"',$this->file->published); ?></td>
	<tr>
		<td width="200"><label for="FileName"><?php echo JText::_('RSFL_FILE_NAME'). ':'; ?></label></td>
		<td><input type="text" name="FileName" value="<?php echo $this->file->FileName; ?>" id="FileName" size="50" maxlength="255" /></td>
	</tr>
	<tr>
		<td width="200"><label for="DateAdded"><?php echo JText::_('RSFL_FILE_DATE'). ':'; ?></label></td>
		<td><?php echo JHTML::_('calendar', date('Y-m-d',$this->file->DateAdded), "DateAdded", "DateAdded"); ?></td>
	</tr>
	<?php if (is_file($this->file->FilePath)) { ?>
	<tr>
		<td width="200"><label for="FileStatistics"><?php echo JText::_('RSFL_FILE_STATISTICS'). ':'; ?></label></td>
		<td><?php echo JHTML::_('select.booleanlist','FileStatistics','class="inputbox"',$this->file->FileStatistics); ?></td>
	</tr>
	<tr>
		<td width="200"><label for="FileVersion"><?php echo JText::_('RSFL_FILE_VERSION'). ':'; ?></label></td>
		<td><input id="FileVersion" type="text" name="FileVersion" size="10" value="<?php echo $this->file->FileVersion; ?>" /></td>
	</tr>
	<tr>
		<td width="200"><label for="IdLicense"><?php echo JText::_('RSFL_FILE_LICENSE'). ':'; ?></label></td>
		<td><?php echo $this->lists['licenses']; ?></td>
	</tr>
	<tr>
		<td width="200"><label for="DownloadMethod"><?php echo JText::_('RSFL_DOWNLOAD_METHOD'). ':'; ?></label></td>
		<td><?php echo $this->lists['downloads']; ?></td>
	</tr>
	<?php } ?>
	<tr>
		<td width="200" valign="top"><label for="description"><?php echo JText::_('RSFL_FILE_DESCRIPTION'). ':'; ?></label></td>
		<td><?php echo $this->editor->display('FileDescription',$this->file->FileDescription,500,250,70,10,false); ?></td>
	</tr>
	<tr>
		<td width="200"><label for="thumb"><?php echo JText::_('RSFL_FILE_THUMB').':'; ?></label></td>
		<td>
		<?php if (!empty($this->file->FileThumb)) { ?>
		<p>
		<?php echo JHTML::_('image', JURI::root().'components/com_rsfiles/images/thumbs/files/'.$this->file->FileThumb, '','style="vertical-align: middle;"'); ?>
		<a href="index.php?option=com_rsfiles&task=deletethumb&controller=files&cid=<?php echo $this->file->IdFile.$this->itemid; ?>"><?php echo JHTML::_('image', JURI::root().'administrator/components/com_rsfiles/assets/images/icons/delete.png', ''); ?></a>
		</p>
		<?php } else { ?>
		<input type="file" name="thumb" value="" id="thumb" size="50" />
		<?php } ?>
		</td>
	</tr>
</table>

<input type="hidden" name="FilePath" value="<?php echo $this->path; ?>" />
</form>