<?php
// $Id: admin.massmail.html.php,v 1.6 2003/11/26 01:42:24 eddieajau Exp $
/**
* Administrator mass mail presentation layer
* @package Mambo Open Source
* @Copyright (C) 2000 - 2003 Miro International Pty Ltd
* @ All rights reserved
* @ Mambo Open Source is Free Software
* @ Released under GNU/GPL License: http://www.gnu.org/copyleft/gpl.html
* @version $Revision: 1.6 $
**/

// ensure this file is being included by a parent file
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );

class HTML_massmail {
	function messageForm( &$lists, $option ) {
?>
<script language="javascript" type="text/javascript">
	function submitbutton(pressbutton) {
		var form = document.adminForm;
		if (pressbutton == 'cancel') {
			submitform( pressbutton );
			return;
		}
		// do field validation
		if (form.mm_subject.value == ""){
			alert( "Please fill in the subject" );
		} else if (getSelectedValue('adminForm','mm_group') < 0){
			alert( "Please select a group" );
		} else if (form.mm_message.value == ""){
			alert( "Please fillin the message" );
		} else {
			submitform( pressbutton );
		}
	}
</script>

<form action="index2.php" name="adminForm" method="POST">
<table cellpadding="4" cellspacing="0" border="0" width="100%">
	<tr>
		<td width="100%"><span class="sectionname"><img src="images/mos_gel.png" width="70" height="67" align="middle">Mass Mail</span></td>
	</tr>
</table>
<table cellpadding="5" cellspacing="1" border="0" width="100%" class="adminform">
	<tr>
		<td width="150">Group:</td>
		<td width="85%"><?php echo $lists['gid']; ?></td>
	</tr>
	<tr>
		<td width="150">Mail to Child Groups:</td>
		<td width="85%"><input type="checkbox" name="mm_recurse" value="RECURSE" /></td>
	</tr>
	<tr>
		<td width="150">Subject:</td>
		<td width="85%"><input class="inputbox" type="text" name="mm_subject" value="" size="50"></td>
	</tr>
	<tr>
		<td width="150" valign="top">Message:</td>
		<td width="85%"><textarea cols="50" rows="5" name="mm_message" wrap="virtual" class="inputbox"></textarea></td>
	</tr>
</table>
<input type="hidden" name="option" value="<?php echo $option; ?>">
<input type="hidden" name="task" value="">
</form>
<?php
	}
}
?>