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

defined( '_JEXEC' ) or die( 'Restricted access' ); 
?>
<form action="index.php" method="post" name="adminForm2" autocomplete="off">
<fieldset>
<div style="float: right">
<button type="submit" onclick="submitbutton('save');window.top.setTimeout('window.parent.document.getElementById(\'sbox-window\').close()', 700);"><?php echo JText::_('RSE_SAVE_BTN'); ?></button>
<button type="button" onclick="window.parent.document.getElementById('sbox-window').close();"><?php echo JText::_('RSE_CANCEL_BTN'); ?></button>
</div>

<div class="configuration" ><?php echo JText::_('RSE_FILE_EDIT'); ?></div>
</fieldset>

<fieldset>
<table cellspacing="0" cellpadding="0" border="0" width="100%">
		<tr>
			<td valign="top">
				<table  class="adminform">
					<tr>
						<td width="200">
							<label for="fileName">
								<?php echo JText::_( 'RSE_FILE_NAME' ).':'; ?>
							</label>
						</td>
						<td>
							<input type="text" name="FileName" value="<?php echo $this->fileDetails->FileName; ?>" size="40" />
						</td>
					</tr>
					<tr>
						<td width="200">
							<label for="fileDescription">
								<?php echo JText::_( 'RSE_FILE_DESCRIPTION' ).':'; ?>
							</label>
						</td>
						<td>
							<textarea name="FileDescription" cols="40" rows="10"><?php echo $this->fileDetails->FileDescription;?></textarea>
						</td>
					</tr>
					<tr>
						<td width="200">
							<label for="fileLocation">
								<?php echo JText::_( 'RSE_FILE_LOCATION' ).':'; ?>
							</label>
						</td>
						<td>
							<a href="<?php echo JURI::root().'components/com_rsevents/files/'.$this->fileDetails->FileLocation; ?>"><?php echo $this->fileDetails->FileLocation; ?></a>
						</td>
					</tr>
					<tr>
						<td width="200">
							<label for="permissions">
								<?php echo JText::_( 'RSE_FILE_PERMISSIONS' ).':'; ?>
							</label>
						</td>
						<td>
							<strong><?php echo JText::_( 'RSE_FILE_PERMISSIONS_EVERYONE' ); ?></strong><br/>
							<input type="checkbox" name="FilePermission[0]" value="001" <?php echo $this->filePermission[0]; ?> /> <?php echo JText::_( 'RSE_FILE_PERMISSIONS_BEFORE' ); ?><br/>
							<input type="checkbox" name="FilePermission[1]" value="002" <?php echo $this->filePermission[1]; ?> /> <?php echo JText::_( 'RSE_FILE_PERMISSIONS_DURING' ); ?><br/>
							<input type="checkbox" name="FilePermission[2]" value="003" <?php echo $this->filePermission[2]; ?> /> <?php echo JText::_( 'RSE_FILE_PERMISSIONS_AFTER' ); ?><br/>
							<strong><?php echo JText::_( 'RSE_FILE_PERMISSIONS_REGISTERED' ); ?></strong><br/>
							<input type="checkbox" name="FilePermission[3]" value="004" <?php echo $this->filePermission[3]; ?> /> <?php echo JText::_( 'RSE_FILE_PERMISSIONS_BEFORE' ); ?><br/>
							<input type="checkbox" name="FilePermission[4]" value="005" <?php echo $this->filePermission[4]; ?> /> <?php echo JText::_( 'RSE_FILE_PERMISSIONS_DURING' ); ?><br/>
							<input type="checkbox" name="FilePermission[5]" value="006" <?php echo $this->filePermission[5]; ?> /> <?php echo JText::_( 'RSE_FILE_PERMISSIONS_AFTER' ); ?><br/>
							
						</td>
					</tr>
				</table>
			</td>
		</tr>
	</table>
</fieldset>
<?php echo JHTML::_( 'form.token' ); ?>
<input type="hidden" name="option" value="com_rsevents" />
<input type="hidden" name="cid" value="<?php echo $this->fileDetails->IdEvent; ?>" />
<input type="hidden" name="IdFile" value="<?php echo $this->fileDetails->IdFile; ?>" />
<input type="hidden" name="controller" value="files" />
<input type="hidden" name="component" value="com_rsevents" />
<input type="hidden" name="view" value="files" />
<input type="hidden" name="tmpl" value="component" />
<input type="hidden" name="task" value="save" />
</form>

<?php
//keep session alive while editing
JHTML::_('behavior.keepalive');
?>
</form>