<?php
// check rights
if ($login->check_rights()>=3):
// loading of reqired classes
include CLASSES_PATH."Mail_messages.php";
// creating of instances
$mail_messages=new Mail_messages();
// sending
if (isset($_POST["submit"])) { $mail_messages->send(); }
?>

<h2><?php echo LANG_MAIL_MESSAGES; ?></h2>

<form action="./admin.php?f=mail_messages" method="post">

<div>

<p><strong><?php echo LANG_FROM; ?>:</strong><br /><input type="text" name="from" value="<?php if (isset($_POST["from"])) echo $_POST["from"]; ?>" style="width: 150px;"<?php if (isset($_POST["submit"]) AND $_POST["from"]=="") { echo " class=\"input-error\""; } ?> /></p>

<p><strong><?php echo LANG_SUBJECT; ?>:</strong><br /><input type="text" name="subject" value="<?php if (isset($_POST["subject"])) echo $_POST["subject"]; ?>" style="width: 700px;"<?php if (isset($_POST["submit"]) AND $_POST["subject"]=="") { echo " class=\"input-error\""; } ?> /></p>

<p><strong><?php echo LANG_TEXT; ?>:</strong><br /><textarea name="text" cols="" rows="" style="width: 700px; height: 100px;"<?php if (isset($_POST["submit"]) AND $_POST["text"]=="") { echo " class=\"input-error\""; } ?>><?php if (isset($_POST["text"])) echo $_POST["text"]; ?></textarea></p>

</div>

<div>

<p><input type="submit" name="submit" value="<?php echo LANG_SEND; ?>" /></p>

</div>

</form>

<?php else: $access_denied=1; endif; ?>