<h1>Mail Sender</h1>

<flexy:switch var="{mode}">
<flexy:case value="">

    {if:eq(status,#ok#)}
    <h2>Message was sended</h2>
    {end:}

    {if:eq(status,#failed#)}
    <h2>Message send - failed</h2>
    {end:}

    <FORM action="admin.php" method=POST>
    <input type=hidden name="target" value="sendmail">
    <input type=hidden name="mode" value="send">
    <input type=submit value=" Send new message to users ">
    </form>
    <br>
    <flexy:include src="admin/sendmail/list.tpl">
    <flexy:break>
<flexy:case value="view">
    <FORM action="admin.php" method=POST>
    <input type=hidden name="target" value="sendmail">
    <input type=hidden name="mode" value="send">
    <input type=submit value=" Send new message to users ">
    </form>
    <br>
    <flexy:include src="admin/box.tpl" body="admin/sendmail/view.tpl" title="View message send-status">
    <br>
    <flexy:include src="admin/sendmail/list.tpl">
    <flexy:break>
<flexy:case value="send">
    <flexy:include src="admin/box.tpl" body="admin/sendmail/send.tpl" title="Send message to users">
    <br>
    <flexy:include src="admin/sendmail/list.tpl">
    <flexy:break>
<flexy:end>
