<?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');
echo $this->layout[0];
?>
<div id="rsevents-action">
<h3><?php echo  JText::_('RSE_MESSAGE_TITLE'); ?></h3>
<form action="index.php" method="post" name="adminForm" id="adminForm">
	<table width="100%">
		<tr>
			<td><?php echo  JText::_('RSE_MESSAGE_TO');?></td>
			<td>
				<label for="state-1"><?php echo  JText::_('RSE_MESSAGE_DENIED');?></label> <input type="checkbox" name="SubscriptionState[]" value="-1" id="state-1" />
				<label for="state0"><?php echo  JText::_('RSE_MESSAGE_PENDING');?></label> <input type="checkbox" name="SubscriptionState[]" value="0" id="state0" />
				<label for="state1"><?php echo  JText::_('RSE_MESSAGE_ACCEPTED');?></label> <input type="checkbox" name="SubscriptionState[]" value="1" id="state1" />
			</td>
		</tr>
		<tr>
			<td><?php echo  JText::_('RSE_MESSAGE_SUBJECT');?></td>
			<td><input type="text" name="subject" value="" class="rsevents-message"/></td>
		</tr>
		<tr>
			<td><?php echo  JText::_('RSE_MESSAGE_BODY');?></td>
			<td>
				<?php $editor=& JFactory::getEditor();
				echo $editor->display('message','',450,400,50,10); ?>
			</td>
		</tr>
		<tr>
			<td>&nbsp;</td>
			<td><button type="submit" onclick="return rsevents_send_validation();" ><?php echo JText::_('RSE_MESSAGE_SEND');?></button>
			&nbsp;&nbsp;&nbsp;
			<button type="button" onclick="document.location='<?php echo html_entity_decode(JRoute::_('index.php?option=com_rsevents&view=events&layout=show&cid='.$this->data->IdEvent)); ?>'"><?php echo JText::_('RSE_CANCEL_BTN'); ?></button>
			</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->IdEvent; ?>" />
	<input type="hidden" name="IdEvent" value="<?php echo $this->data->IdEvent; ?>" />
	<input type="hidden" name="controller" value="events" />
	<input type="hidden" name="view" value="events" />
	<input type="hidden" name="Itemid" value="<?php echo $this->Itemid; ?>" />
	<input type="hidden" name="layout" value="guestsendmessage" />
	<input type="hidden" name="task" value="guestsendmessage" />

</form>
</div>
<?php
echo $this->layout[1];
?>