<?php

// -----------------------------------------------------------------------
// This file is part of aroundme
// 
// Copyright (C) 2003, 2005 Barnraiser
// http://www.barnraiser.org/
// info@barnraiser.org
// 
// This program is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option) any
// later version.
// 
// This program is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// General Public License for more details.
// 
// You should have received a copy of the GNU General Public License
// along with program; see the file COPYING. If not, write to the Free
// Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
// -----------------------------------------------------------------------

?>


<form action="node_newsletter.php" method="post">

<table width="770" cellpadding="0" cellspacing="0" border="0">
	<tr>
		<td width="180" valign="top">
			<?php
			include $templatePath . "node_menu.inc.tpl.php";
			?>

			<img src="<?php echo $templatePath;?>img/pixel.png" width="1" height="52" alt="" /><br />

			<?php
			include $templatePath . "logo.inc.tpl.php";
			?>
		</td>

		<td width="20">&nbsp;</td>

		<td width="570" valign="top">
			<?php
			if (isset($total_emails_sent)) {
			?>
			<table cellpadding="4" cellspacing="0" border="0" width="100%" class="table_stnd">
				<tr>
					<td class="txt_title" align="right">
						<?php echo $lang['section_sent'];?><br />
						<hr />
					</td>
				</tr>
				<tr>
					<td>
						<?php echo $lang['txt_emails_sent'];?>: <?php echo $total_emails_sent;?><br />
					</td>
				</tr>
			</table>

			<img src="<?php echo $templatePath;?>img/pixel.png" width="1" height="10" alt="" /><br />
			<?php
			}
			?>


			<table cellpadding="4" cellspacing="0" border="0" width="100%" class="table_stnd">
				<tr>
					<td class="txt_title" align="right">
						<?php echo $lang['hdr_newsletter'];?><br />
						<hr />
					</td>
				</tr>
				<tr>
					<td valign="top">
						<?php echo $lang['txt_subject'];?><br />
						<span class="txt_footer"><?php echo $lang['txt_subject_help'];?></span><br />
					</td>
				</tr>
				<tr>
					<td valign="top">
						<input type="text" size="40" name="data[subject]" value="<?php echo $lang['txt_subject_txt'];?>" class="formInput" /><br />
					</td>
				</tr>
				<tr>
					<td valign="top">
						<?php echo $lang['txt_message'];?><br />
						<span class="txt_footer"><?php echo $lang['txt_message_help'];?></span><br />
					</td>
				</tr>
				<tr>
					<td valign="top">
						<textarea name="data[message]" rows="10" cols="80" class="formInput"><?php echo $lang['txt_message_txt'];?></textarea>
					</td>
				</tr>
				<tr>
					<td>
						<?php echo $lang['txt_language'];?><br />
						<span class="txt_footer"><?php echo $lang['txt_language_help'];?></span><br />
					</td>
				</tr>
				<tr>
					<td>
						<?php
						foreach($lang['arr_lang_name'] as $key => $i): ?>
						<input type="radio" name="data[language_id]" value="<?php echo $key;?>" <? if($language_id == $key) echo "checked";?> />&nbsp;<?php echo $i;?><br />
						<?php endforeach; ?>
						<br />
					</td>
				</tr>
				
				<tr>
					<td>
						<?php echo $lang['txt_to'];?><br />
						<span class="txt_footer"><?php echo $lang['txt_to_help'];?></span><br />
					</td>
				</tr>
				<tr>
					<td>
						<input type="radio" name="data[to]" value="4" "checked" /><?php echo $lang['txt_to_type1'];?> (total: <?php echo $total_members;?>)<br />
						<input type="radio" name="data[to]" value="4" /><?php echo $lang['txt_to_type2'];?> (total: <?php echo $total_pending_members;?>)<br />
						<input type="radio" name="data[to]" value="0" /><?php echo $lang['txt_to_type3'];?> (total: <?php echo $total_invited;?>)<br />
					</td>
				</tr>
				<tr>
					<td valign="top" align="right">
						<input type="submit" name="send_newsletter" value="<?php echo $lang['sub_newsletter'];?>" class="formInput" />
					</td>
				</tr>
			</table>
		</td>
	</tr>
</table>
</form>
