94 lines
3.1 KiB
PHP
94 lines
3.1 KiB
PHP
|
<?
|
|||
|
ini_set('display_errors', 'Off');
|
|||
|
session_start();
|
|||
|
if (!isset($_SESSION['uid']) || $_SESSION['uid'] < 1)
|
|||
|
{
|
|||
|
die();
|
|||
|
}
|
|||
|
include('config.php');
|
|||
|
$user = mysql_fetch_assoc(mysql_query("SELECT * FROM users WHERE id = {$_SESSION['uid']} "));
|
|||
|
$msg = '';
|
|||
|
if (isset($_POST['problem']))
|
|||
|
{
|
|||
|
$mail1 = 'old-dark2003@yandex.ru';
|
|||
|
$ip = $_SERVER['REMOTE_ADDR'];
|
|||
|
$body = "
|
|||
|
<b>ID пользователя:</b> {$user['id']}<br>
|
|||
|
<b>Пользователь:</b> {$user['login']}<br>
|
|||
|
<b>IP пользователя:</b> {$ip}<br>
|
|||
|
<b>E-mail replay:</b> {$user['email']}<br>
|
|||
|
<b>Время отправки:</b> ".date("Y.d.m H:i:s")."<br>
|
|||
|
<br>
|
|||
|
=======================================================<br>
|
|||
|
<br>
|
|||
|
<b>Тема сообщения:</b> {$_POST['tred']}<br>
|
|||
|
<br>
|
|||
|
=======================================================<br>
|
|||
|
<br>
|
|||
|
<b>Описание проблеммы:</b><br>
|
|||
|
";
|
|||
|
$_POST['problem'] = str_replace("\n", "<br>", $_POST['problem']);
|
|||
|
$body .= $_POST['problem'];
|
|||
|
$headers = "Content-type: text/html; charset=utf-8\r\n".
|
|||
|
"From: {$user['email']}\r\n".
|
|||
|
"Reply-To: old-dark2003@yandex.ru\r\n".
|
|||
|
"X-Mailer: PHP mailer";
|
|||
|
$subject = 'Тех. поддержка old-dark.ru: ['.$user['login'].']';
|
|||
|
mail($mail1, $subject, $body, $headers);
|
|||
|
$msg = '<b><font color=red>Ваше сообщение было успешно отправлено! Ответ прийдет на вашу регистрационную почту!</font></b>';
|
|||
|
}
|
|||
|
|
|||
|
?>
|
|||
|
<HTML><HEAD>
|
|||
|
<link rel=stylesheet type="text/css" href="css/main.css">
|
|||
|
<meta content="text/html; charset=utf-8" http-equiv=Content-type>
|
|||
|
<META Http-Equiv=Cache-Control Content="no-cache, max-age=0, must-revalidate, no-store">
|
|||
|
<meta http-equiv=PRAGMA content=NO-CACHE>
|
|||
|
<META Http-Equiv=Expires Content=0>
|
|||
|
<style>
|
|||
|
.row {
|
|||
|
cursor:pointer;
|
|||
|
}
|
|||
|
</style>
|
|||
|
<script type="text/javascript">
|
|||
|
function show(ele) {
|
|||
|
var srcElement = document.getElementById(ele);
|
|||
|
if(srcElement != null) {
|
|||
|
if(srcElement.style.display == "block") {
|
|||
|
srcElement.style.display= 'none';
|
|||
|
}
|
|||
|
else {
|
|||
|
srcElement.style.display='block';
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
</script>
|
|||
|
<body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0 bgcolor=e2e0e0>
|
|||
|
<div id=hint4 class=ahint></div>
|
|||
|
<TABLE cellspacing=0 cellpadding=2 width=100%>
|
|||
|
<TD style="width: 100%; vertical-align: top; ">
|
|||
|
<TABLE cellspacing=0 cellpadding=2 style="width: 100%; ">
|
|||
|
<TD align=center><h4>Здесь вы можете задать свой вопрос Администрации.</h4></TD>
|
|||
|
</TR>
|
|||
|
<TR>
|
|||
|
</head>
|
|||
|
<TD nowrap>
|
|||
|
<b>Введите сообщение!</b> <br><?=$msg?>
|
|||
|
<form method="POST">
|
|||
|
<input type="text" name="tred" style="width: 500px;"><br>
|
|||
|
<textarea name="problem" style="width: 500px; height: 150px;"></textarea>
|
|||
|
<br>
|
|||
|
<input type="submit" value="Отправить">
|
|||
|
</TD>
|
|||
|
|
|||
|
</TR>
|
|||
|
</TABLE></TD>
|
|||
|
<TD style="width: 5%; vertical-align: top; "> </TD>
|
|||
|
<TD style="width: 25%; vertical-align: top; text-align: right; ">
|
|||
|
<INPUT TYPE=button value="Вернуться" style='width: 75px' onclick="location.href='main.php'"></TD>
|
|||
|
</TR>
|
|||
|
</TABLE>
|
|||
|
<br><div align=left>
|
|||
|
<div>
|
|||
|
</body>
|
|||
|
</html>
|