Файл: public_html/rass.php
Строк: 27
<?
include './system/common.php';
include './system/functions.php';
include './system/user.php';
$title = 'Рассылка';
include './system/h.php';
if($user[access]<2) {
header('location:/');
exit();
}
?>
<?
$text = _string($_POST['text']);
?>
<div class="dot-line"></div>
<div class="block_zero">
<form action="?go=go" method="post">
<br>
<center><input type="text" name="text" value="" size="50"> </center>
<br>
<center><span class="btn"><span class="end">
<input class="label" type="submit" value="Отправить почту">Отправить почту</span></span></form></div></center>
<?
$s_mail = mysql_query("SELECT * FROM `users`");
while($um= mysql_fetch_assoc($s_mail)){
?>
<?
if($_GET[go]==go) {
mysql_query("INSERT INTO `mail` SET `from` = 1,`to` = ".$um[id].", `text` = '".$text."',`time` = ".time()."");
mysql_query("INSERT INTO `contacts` SET `ho` = 1,`user` = ".$um[id].",`time` = ".time()."");
header('location:?');
}
?>
<?
}
?>