Вход Регистрация
Файл: sendmail.php
Строк: 217
<?
session_start
();
$urlpage='Внешняя почта';
include(
"header.php");
?>
<?
$send
=$_POST["send"];
$from_email=$_REQUEST["from_email"];
$tema=$_REQUEST["tema"];
$mess=$_POST["mess"];
$code=$_POST["code"];
$send_mail=$lang['send_mail'];
$send_mail1=$lang['send_mail1'];
$send_mail2=$lang['send_mail2'];
$send_mail3=$lang['send_mail3'];
$send_mail4=$lang['send_mail4'];
$send_mail5=$lang['send_mail5'];
function 
print_form_mail($form,$send_mail,$send_mail1,$send_mail2,$send_mail3,$send_mail4,$send_mail5,$email,$from_email,$tema,$mess,$code,$moduletablehilite3,$moduletable) {
?>
<div align="center">
<div class="s5_mod_h3_l">
<div class="s5_mod_h3_r">
<div class="s5_mod_h3_m">
<h3 class="s5_mod_h3"><span class="s5_h3_first">
<?=$send_mail;?>
</span></h3>
</div>
</div>
</div>
</div>
<FORM METHOD="POST" ACTION="sendmail.php">
<TABLE class="form" width="95%" border="1" align="center" cellpadding="2" cellspacing="2">
<tr>
<td align="left" width="120px"><font color="red">*</font> E-mail:</td>
<td align="left"><INPUT class="form6 resizable" TYPE="text" NAME="from_email" maxlength="30" 
<?if(isset($email)): echo "value='$email'";endif;?>
<?
if(isset($from_email)): echo "value='$from_email'";endif;?>></td>
</tr>
<tr>
<td align="left"><font color="red">*</font> <?=$send_mail1;?> :</td>
<td align="left"><INPUT class="form6 resizable" TYPE="text" NAME="tema" size="40" maxlength="40" <?if(isset($tema)): echo "value='$tema'";endif;?>></td>
</tr>
<tr>
<td align="left"><font color="red">*</font> <?=$send_mail2;?> :</td>
<td align="left"><TEXTAREA id=""  class="form2 resizable" NAME="mess" ROWS="6" COLS="60" wrap="hard"><?=$mess;?></TEXTAREA></td>
</tr>
<tr>
<td align="left"><font color="red">*</font> <?=$send_mail3;?> :</td>
<td align="left"><img src="turimg.php">&nbsp;<INPUT class="form6 resizable" TYPE="text" NAME="code" maxlength="4" size="8"></td>
</tr>
<tr>
<td colspan="2" align="center"><br><INPUT class="button" TYPE="submit" name="send" value=".:: <?=$send_mail4;?> ::."></td>
</tr>
</TABLE>
</FORM>
<br><center>
<b><?=$send_mail5;?></b></center>
<?
}
if(!isset(
$send)):
print_form_mail($form,$send_mail,$send_mail1,$send_mail2,$send_mail3,$send_mail4,$send_mail5,$email,$from_email,$tema,$mess,$code,$moduletablehilite3,$moduletable);
else:
$ulength=strlen($from_email);
if ((
$ulength<'10') || ($ulength>'30')):
?><br>
<table width="100%" align="center" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center"><font color="red"><?=$lang['gb9'];?></font></td>
</tr>
</table>
<br>
<?
print_form_mail
($form,$send_mail,$send_mail1,$send_mail2,$send_mail3,$send_mail4,$send_mail5,$email,$from_email,$tema,$mess,$code,$moduletablehilite3,$moduletable);
else:
$ulength=strlen($tema);
if ((
$ulength<'5') || ($ulength>'140')):
?><br>
<table width="100%" align="center" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center"><font color="red"><?=$lang['send_mail7'];?></font></td>
</tr>
</table>
<br>
<?
print_form_mail
($form,$send_mail,$send_mail1,$send_mail2,$send_mail3,$send_mail4,$send_mail5,$email,$from_email,$tema,$mess,$code,$moduletablehilite3,$moduletable);
else:
$ulength=strlen($mess);
if ((
$ulength<'10') || ($ulength>'500')):
?><br>
<table width="100%" align="center" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center"><font color="red"><?=$lang['gb10'];?></font></td>
</tr>
</table>
<br>
<?
print_form_mail
($form,$send_mail,$send_mail1,$send_mail2,$send_mail3,$send_mail4,$send_mail5,$email,$from_email,$tema,$mess,$code,$moduletablehilite3,$moduletable);
else:
if( 
strtolower($_POST['code'])!= strtolower($_SESSION['texto'])):
?><br>
<table width="100%" align="center" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center"><font color="red"><?=$lang['gb11'];?></font></td>
</tr>
</table>
<br>
<?
print_form_mail
($form,$send_mail,$send_mail1,$send_mail2,$send_mail3,$send_mail4,$send_mail5,$email,$from_email,$tema,$mess,$code,$moduletablehilite3,$moduletable);
else:
if (
ereg(".+@.+..+"$from_email)):
$sql2=mysql_query("select*from ".$db_pref."sysvals");
$row2=mysql_fetch_array($sql2);
$site_url=$row2['site_url'];
$name_title=$row2['name_title'];
$sqlad=mysql_query("select*from ".$db_pref."users where id='1'");
$rowad=mysql_fetch_array($sqlad);
$admin_email=$rowad['email'];
?><br>
<table width="100%" align="center" border="0" cellpadding="2" cellspacing="2">
<tr>
<td align="center"><div class="form">
<h3 align="center"><i><?=$lang['send_mail6'];?></i></h3></div></td>
</tr>
<tr>
<td align="center"><font color="gren"><?=$lang['gb13'];?></font></td>
</tr>
</table>
<?
echo "<script language='Javascript'>function reload() {location = "index.php"}; setTimeout('reload()', 3000);</script>";
$message="Уважаемый администратор проекта $name_title
Это письмо отправлено вам посетителем сайта 
$site_url
------------------------------------------------------------
$mess
Войти в аккаунт - 
$site_url/account.php
С наилучшими пожеланиями, Администратор"
;
mail("$admin_email","$tema","$message","From: $from_emailn"."Content-type: text/plain; charset=utf-8");
else:
?><br>
<table width="100%" align="center" border="0" cellpadding="2" cellspacing="2">
<tr>
<td align="center"><font color="red"><?=$lang['gb14'];?></font></td>
</tr>
</table>
<br>
<?
print_form_mail
($form,$send_mail,$send_mail1,$send_mail2,$send_mail3,$send_mail4,$send_mail5,$email,$from_email,$tema,$mess,$code,$moduletablehilite3,$moduletable);
endif;endif;endif;endif;endif;endif;
include(
"footer.php");
?>
Онлайн: 1
Реклама