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

<script language="javascript" type="text/javascript">

function submitbutton(task)
{
	var form = document.adminForm;
	
	if(task == 'cancel')
	{
		submitform(task);
	}
	else  
	{
		ret = true;
		if(form.FirstName.value=='') { form.FirstName.className = 'rserror'; ret=false; } else { form.FirstName.className = '';  }	
		if(form.Email.value=='') { form.Email.className = 'rserror'; ret=false; } else { form.Email.className = '';  }	
		if(ret) submitform(task);
	}
	return false;
	 
}
</script>
<style>
.rserror 
{
	border:1px solid red;
}
</style>
<form action="index.php" method="post" name="adminForm" id="adminForm">

	<table cellspacing="0" cellpadding="0" border="0" width="100%">
		<tr>
			<td valign="top">
				<table  class="adminform">
					<tr>
						<td>
							<label for="eventName">
								<?php echo JText::_( 'RSE_SUBSCRIBER_SELECT' ).':'; ?>
							</label>
						</td>
						<td>						
							<input name="TicketsSubscribed" value="<?php echo empty($this->data->TicketsSubscribed) ? '' : $this->data->TicketsSubscribed; ?>" size="3" /> <?php echo $this->lists3['events'];	?>
						</td>
					</tr>
					<tr>
						<td>
							<label for="firstname">
								<?php echo JText::_( 'RSE_SUBSCRIBER_FIRSTNAME' ).':'; ?>
							</label>
						</td>
						<td>						
							<input name="FirstName" value="<?php echo $this->data->FirstName; ?>" size="50" />
						</td>
					</tr>
					<tr>
						<td>
							<label for="lastname">
								<?php echo JText::_( 'RSE_SUBSCRIBER_LASTNAME' ).':'; ?>
							</label>
						</td>
						<td>						
							<input name="LastName" value="<?php echo $this->data->LastName; ?>" size="50" />
						</td>
					</tr>
					<tr>
						<td>
							<label for="email">
								<?php echo JText::_( 'RSE_SUBSCRIBER_EMAIL' ).':'; ?>
							</label>
						</td>
						<td>						
							<input name="Email" value="<?php echo $this->data->Email; ?>" size="50" />
						</td>
					</tr>
					<?php if(JRequest::getInt('cid') == 0 || $this->data->IdUser != 0) { ?>
					<tr>
						<td>
							<label for="user">
								<?php echo JText::_( 'RSE_SUBSCRIBER_USERNAME' ).':'; ?>
							</label>
						</td>
						<td>						
							<?php echo $this->lists1['username']; ?>
						</td>
					</tr>
					<?php } ?>
					<tr>
						<td>
							<label for="user">
								<?php echo JText::_( 'RSE_SUBSCRIBER_STATUS' ).':'; ?>
							</label>
						</td>
						<td>						
							<?php echo $this->lists2['changeStatus']; ?>
						</td>
					</tr>
				</table>
			</td>
		</tr>
	</table>
<?php echo JHTML::_( 'form.token' ); ?>
<input type="hidden" name="option" value="com_rsevents" />
<input type="hidden" name="cid" value="<?php echo $this->data->IdSubscription; ?>" />
<input type="hidden" name="IdSubscription" value="<?php echo $this->data->IdSubscription; ?>" />
<input type="hidden" name="controller" value="subscriptions" />
<input type="hidden" name="view" value="subscriptions" />
<input type="hidden" name="task" value="" />
</form>

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