Размер файла: 2.15Kb
<?php
require('includes/header.php');
require('includes/utils.php');
require('includes/db.php');
require('includes/config.php');
$login = addslashes($_GET['login']);
$message = '';
if(isset($_POST['email']) && isset($_POST['msg']))
{
if($_POST['msg'] == '')
{
$message = '<b>Не заполнено поле ввода "Сообщение"!</b><br/>';
}
else
{
$users = mysql_query('SELECT id, email FROM users WHERE login = "' . $login . '"');
$user = mysql_fetch_array($users, MYSQL_ASSOC);
$email = $user['email'];
mail($email, 'Message from contacts form on your site', $_POST['msg']);
?>
<wml>
<card id="ok" title="ok" ontimer="http://<?php echo $login . '.' . $server_name; ?>"><timer value="20"/>
<do type="prev" label="назад"><prev/></do>
<p align="center">
<b>Ваше письмо успешно отправлено</b>
</p>
</card>
</wml>
<?php
exit;
}
}
?>
<wml>
<card id="send" title="Send">
<do type="prev" label="назад"><prev/></do>
<p>
<?php echo $message; ?>
Ваш e-mail для ответа:<br/>
<input name="email" maxlength="50" title="Email" format="*x"/><br/>
*Сообщение:<br/>
<input name="msg" title="Text"/><br/>
<anchor title="Sign">Отправить<go href="send.php?login=<?php echo $login; ?>" method="post">
<postfield name="email" value="$(email)"/>
<postfield name="msg" value="$(msg)"/>
</go></anchor><br/>
<a href="http://<?php echo $login . '.' . $server_name; ?>">На главную</a>
</p>
</card>
</wml>