<?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' ); 
jimport( 'joomla.application.component.view');

class rseventsViewFiles extends JView
{
	function display($tpl = null)
	{
		$task=JRequest::getVar('task','','request');
		switch($task)
		{
			
			case 'editfile':
			{
			
			$fileDetails=$this->get('FileData');
			$this->assignRef('fileDetails',$fileDetails);
			if(empty($fileDetails->FilePermission))
			$fileDetails->FilePermission = '111111';
			$filePermission[0] = ($fileDetails->FilePermission[0]==0 ? '' : 'checked="checked"');
			$filePermission[1] = ($fileDetails->FilePermission[1]==0 ? '' : 'checked="checked"');
			$filePermission[2] = ($fileDetails->FilePermission[2]==0 ? '' : 'checked="checked"');
			$filePermission[3] = ($fileDetails->FilePermission[3]==0 ? '' : 'checked="checked"');
			$filePermission[4] = ($fileDetails->FilePermission[4]==0 ? '' : 'checked="checked"');
			$filePermission[5] = ($fileDetails->FilePermission[5]==0 ? '' : 'checked="checked"');
			
			$this->assignRef('filePermission' , $filePermission);

			} break;
			
		}
		
		
		parent::display($tpl);
	}
}