<?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');

$modifyRegister = JRequest::getVar('modify_register');
if(!empty($modifyRegister))
{
	$globalRegisterCode = '';
}
else
{
	$globalRegisterCode = $this->rsfilesConfig['license_code'];
}

?>
<form action="index.php?option=com_rsfiles" method="post" name="adminForm">
<table class="thisform">
		<tr class="thisform">
  		<td width="50%" valign="top" class="thisform">
  			<table width="100%" class="thisform2" border="1">
  				<tr class="thisform2">
      				<td align="center" height="100px" width="33%" class="thisform2">
      				<div align="center">
			            <a href="index.php?option=com_rsfiles&task=files" style="text-decoration:none;" title="<?php echo JText::_( 'RSFL_FILES_MENU' ); ?>">
			            <img src="<?php echo JURI::root(); ?>administrator/components/com_rsfiles/assets/images/icons/files.png" width="48px" height="48px" align="middle" border="0"/>
			            <br />
			            <?php echo JText::_( 'RSFL_FILES_MENU' ); ?>
			            </a>
			        </div>
					</td>
      				<td align="center" height="100px" class="thisform2">
			            <a href="index.php?option=com_rsfiles&task=licenses" style="text-decoration:none;" title="<?php echo JText::_( 'RSFL_LICENSE_MENU' ); ?>">
			            <img src="<?php echo JURI::root(); ?>administrator/components/com_rsfiles/assets/images/icons/license.png" width="48px" height="48px" align="middle" border="0"/>
			            <br />
			            <?php echo JText::_( 'RSFL_LICENSE_MENU' ); ?>
			            </a>
					</td>
					<td align="center" height="100px" width="33%" class="thisform2">
			            <a href="index.php?option=com_rsfiles&task=groups" style="text-decoration:none;" title="<?php echo JText::_( 'RSFL_GROUPS_MENU' ); ?>">
			            <img src="<?php echo JURI::root(); ?>administrator/components/com_rsfiles/assets/images/icons/groups.png" width="48px" height="48px" align="middle" border="0"/>
			            <br />
			            <?php echo JText::_( 'RSFL_GROUPS_MENU' ); ?>
			            </a>
					</td>
				</tr>
  				<tr class="thisform2">
      				<td align="center" height="100px" class="thisform2">
			            <a href="index.php?option=com_rsfiles&task=statistics" style="text-decoration:none;" title="<?php echo JText::_( 'RSFL_STATISTICS_MENU' ); ?>">
			            <img src="<?php echo JURI::root(); ?>administrator/components/com_rsfiles/assets/images/icons/statistics.png" width="48px" height="48px" align="middle" border="0"/>
			            <br />
			            <?php echo JText::_( 'RSFL_STATISTICS_MENU' ); ?>
			            </a>
					</td>
      				<td align="center" height="100px" width="33%" class="thisform2">
			            <a href="index.php?option=com_rsfiles&task=themes" style="text-decoration:none;" title="<?php echo JText::_( 'RSFL_THEMES_MENU' ); ?>">
			            <img src="<?php echo JURI::root(); ?>administrator/components/com_rsfiles/assets/images/icons/themes.png" width="48px" height="48px" align="middle" border="0"/>
			            <br />
			            <?php echo JText::_( 'RSFL_THEMES_MENU' ); ?>
			            </a>
					</td>
					<td align="center" height="100px" width="33%" class="thisform2">
			            <a href="index.php?option=com_rsfiles&task=settings" style="text-decoration:none;" title="<?php echo JText::_( 'RSFL_SETTINGS_MENU' ); ?>">
			            <img src="<?php echo JURI::root(); ?>administrator/components/com_rsfiles/assets/images/icons/settings.png" width="48px" height="48px" align="middle" border="0"/>
			            <br />
			            <?php echo JText::_( 'RSFL_SETTINGS_MENU' ); ?>
			            </a>
					</td>
				</tr>
				<tr class="thisform2">
      				<td align="center" height="100px" class="thisform2">
			            <a href="index.php?option=com_rsfiles&task=updates" style="text-decoration:none;" title="<?php echo JText::_( 'RSFL_UPDATES_MENU' ); ?>">
			            <img src="<?php echo JURI::root(); ?>administrator/components/com_rsfiles/assets/images/icons/update.png" width="48px" height="48px" align="middle" border="0"/>
			            <br />
			            <?php echo JText::_( 'RSFL_UPDATES_MENU' ); ?>
			            </a>
					</td>
					<td></td>
					<td></td>
				</tr>
			</table>

		</td>
	    <td width="50%" valign="top" align="center">

		    <table border="1" width="100%" class="thisform">
				<tr class="thisform">
		            <th class="cpanel" colspan="2"><?php echo JText::_('RSFL_PRODUCT') .' '. JText::_('RSFL_VERSION').' rev '.JText::_('RSFL_REVISION');?></th></td>
		         </tr>
		         <tr class="thisform"><td bgcolor="#FFFFFF" colspan="2"><br />
		      <div style="width=100%" align="center">
		      <img src="<?php echo JURI::root(); ?>administrator/components/com_rsfiles/assets/images/imgs/rsfiles.jpg" align="middle" alt="RSFiles! Logo"/>
		      <br /><br /></div>
		      </td></tr>
		         <tr class="thisform">
		            <td width="120" bgcolor="#FFFFFF"><?php echo JText::_( 'RSFL_CURRENT_VERSION' ); ?></td>
		            <td bgcolor="#FFFFFF"><?php echo JText::_( 'RSFL_VERSION' );?></td>
		         </tr>
		         <tr class="thisform">
		            <td bgcolor="#FFFFFF"><?php echo JText::_( 'RSFL_COPYRIGHT_NAME' ); ?></td>
		            <td bgcolor="#FFFFFF"><?php echo JText::_('RSFL_COPYRIGHT');?></td>
		         </tr>
		         <tr class="thisform">
		            <td bgcolor="#FFFFFF"><?php echo JText::_( 'RSFL_LICENSE_NAME' ); ?></td>
		            <td bgcolor="#FFFFFF"><?php echo JText::_('RSFL_LICENSE_TYPE');?></td>
		         </tr>
		         <tr class="thisform">
		            <td valign="top" bgcolor="#FFFFFF"><?php echo JText::_( 'RSFL_AUTHOR_NAME' ); ?></td>
		            <td bgcolor="#FFFFFF">
		            <?php echo JText::_('RSFL_AUTHOR');?>
					</td>
		         </tr>
				  <tr class="<?php echo ($globalRegisterCode=='') ? 'thisformError':'thisformOk';?>">
					<td valign="top">
						<?php echo JText::_( 'RSFL_LICENSE_CODE' ).':'; ?>
					</td>
					<td>
						<?php echo ($globalRegisterCode=='') ? '<input type="text" size="35" name="rsfilesConfig[license_code]" value="" />' : $globalRegisterCode; ?>
					</td>
		         </tr>
		         <tr class="<?php echo ($globalRegisterCode=='') ? 'thisformError':'thisformOk';?>">
					<td valign="top">&nbsp;</td>
					<td>
						<?php
						if($globalRegisterCode!=''){
						?>
						<input type="submit" name="modify_register" value="<?php echo JText::_( 'RSFL_MODIFY_CODE' ); ?>" /><br/>

						<?php
						}else{
						?>
						<input type="button" name="register" value="<?php echo JText::_( 'RSFL_UPDATE_CODE' ); ?>" onclick="javascript:submitbutton('saveRegistration');"/>
						<?php
						}
						?>
					</td>
		         </tr>
		      </table>
			<br/>
			<?php echo $this->slider->startPane("content-info"); ?>
			<?php echo $this->slider->startPanel(JText::_('RSFL_INFO'),"info"); ?>
			<table cellspacing="0" cellpadding="0" border="0" width="100%">
				<tr>
					<td valign="top">
						<table  class="adminform">
							<tr>
								<td width="490">
									<label for="dldfolder">
										<?php echo $this->rsfilesConfig['download_folder']; ?>
									</label>
								</td>
								<td>
									<?php echo is_writable($this->rsfilesConfig['download_folder']) ? JText::_('RSFL_WRITABLE') : JText::_('RSFL_NOT_WRITABLE'); ?>
								</td>
							</tr>
							<tr>
								<td width="490">
									<label for="imgfld">
										<?php echo JPATH_SITE.DS.'components'.DS.'com_rsfiles'.DS.'images'; ?>
									</label>
								</td>
								<td>
									<?php echo is_writable(JPATH_SITE.DS.'components'.DS.'com_rsfiles'.DS.'images') ? JText::_('RSFL_WRITABLE') : JText::_('RSFL_NOT_WRITABLE'); ?>
								</td>
							</tr>
						</table>
					</td>
				</tr>
		</table>
			<?php echo $this->slider->endPanel(); ?>
			<?php echo $this->slider->endPane(); ?>
			  
			  
			</td>
	   </tr>
	</table>
	
	<input type="hidden" name="task" value="" />
	<input type="hidden" name="option" value="com_rsfiles" />
</form>

