コード例 #1
0
ファイル: contentwin.php プロジェクト: romlg/blank-xpage
 function ocd_send()
 {
     $message = $this->GetValidGP("message", "Сообщение", VALIDATE_NOT_EMPTY);
     $name = $this->GetValidGP("name", "Имя", VALIDATE_NOT_EMPTY);
     $email = $this->GetValidGP("email", "Email", VALIDATE_EMAIL);
     if ($this->errors['err_count'] > 0) {
         $this->mainTemplate = "./templates/content.tpl";
         $title = $this->dec($this->db->GetOne("Select title From `main_pages` Where page_id='2'", ""));
         $content = $this->dec($this->db->GetOne("Select content From `main_pages` Where page_id='2'", ""));
         $this->pageTitle = $title;
         $this->pageHeader = $title;
         $message = "<textarea name='message' rows='6' style='width: 350px;'>{$message}</textarea>";
         $email = "<input type='text' name='email' value='{$email}' maxlength='50' style='width: 250px;' />";
         $name = "<input type='text' name='name' value='{$name}' maxlength='50' style='width: 250px;' />";
         $this->data = array("MAIN_HEADER" => $this->pageHeader, "MAIN_CONTENT" => $content, "MAIN_MESSAGE" => $message, "MAIN_MESSAGE_ERROR" => $this->GetError("message"), "MAIN_NAME" => $name, "MAIN_NAME_ERROR" => $this->GetError("name"), "MAIN_EMAIL" => $email, "MAIN_EMAIL_ERROR" => $this->GetError("email"), "MAIN_URL" => $this->siteUrl);
         $this->data['FORM'][] = array("_" => "_");
     } else {
         header('Content-type: text/html; charset=utf-8');
         $full_message = "Запрос с сайта: \r\n";
         $full_message .= "Имя отправителя: " . $name . "\r\n";
         $full_message .= "Email отправителя: " . $email . "\r\n";
         $full_message .= "Сообщение: \r\n";
         $full_message .= $message;
         $a = send_mime_mail($name, $email, "Admin", $this->adminEmail, "CP1251", "UTF-8", "Запрос со страницы контактов сайта", $full_message);
         if ($a) {
             $this->Redirect($this->siteUrl . "ok");
         } else {
             $this->Redirect($this->siteUrl . "2");
         }
     }
 }
コード例 #2
0
ファイル: functions.php プロジェクト: realtim/mmb
function SendMail($Email, $Message, $ToName = '', $Subject = 'Информация с сайта ММБ')
{
    //
    // 20.01.2012 Заменил штатную функцию на более удобную  send_mime_mail (см. ниже)
    return send_mime_mail('mmbsite', '*****@*****.**', $ToName, $Email, 'UTF-8', 'UTF-8', $Subject, $Message . "\r\n" . 'Используйте для вопросов адрес mmbsite@googlegroups.com' . "\r\n" . 'Ответ на это письмо будет проигнорирован.' . "\r\n");
}
コード例 #3
0
ファイル: kitsend.php プロジェクト: albinaurasova/WGS
require_once "phpmail.php";
$email_admin = "*****@*****.**";
// $email_admin = "*****@*****.**";
$from = "“Tk-Motors”";
$email_from = "*****@*****.**";
$deafult = array("name" => "Имя", "phone" => "Телефон", "email" => "E-mail");
$fields = array();
if (count($_POST)) {
    foreach ($deafult as $key => $value) {
        if (isset($_POST[$key])) {
            $fields[$value] = $_POST[$key];
        }
    }
    $i = 1;
    while (isset($_POST['' . $i])) {
        $fields[$_POST[$i . "-name"]] = $_POST['' . $i];
        $i++;
    }
    $subject = $_POST["subject"];
    $title = "Поступила заявка с сайта " . $from . ":\n";
    $message = "<div><h3 style=\"color: #333;\">" . $title . "</h3>";
    foreach ($fields as $key => $value) {
        $message .= "<div><p><b>" . $key . ": </b>" . $value . "</p></div>";
    }
    $message .= "</div>";
    if (send_mime_mail("Сайт " . $from, $email_from, $name, $email_admin, 'UTF-8', 'UTF-8', $subject, $message, true)) {
        echo "1";
    } else {
        echo "0";
    }
}
コード例 #4
0
ファイル: lost.php プロジェクト: retspen/VoteFoto
								$mail = mysql_fetch_row($sql);
								
								if(empty($mail[0])) {
									echo "<p><font color='red'>Такого почтового ящика не найдено</font>.</p>";
								} else {
									$subject = "Пароль для SS Фотки";
								        $message = "Для входа используйте: <br />" . "\r\n" .
								        	   "<br />" . "\r\n" .
								              	   "пароль: $mail[0] <br />" . "\r\n" .
								              	   "<br />" . "\r\n" .
								              	   "<a href=http://fotki.ss.zp.ua>http://fotki.ss.zp.ua</a> <br />" . "\r\n";

									send_mime_mail('SS Фотки',
	               								       	'*****@*****.**',
		               								'',
											$email,
											'utf-8',
		  									'windows-1251',
	          									$subject,
	          									$message);
								
									echo "<p><font color='red'>Пароль отправлен на почту</font>.</p><p>Перейдите на страницу <a href=/login.php>авторизации</a><p>";
								}
							}
							?>
									<br /><br />
									<form enctype="multipart/form-data" action="/lost.php?send" method="post" name="cursor">
									<table>
										        <tr>
										        <td>Введите email который Вы ввели при регистрации</td>
										        </tr>
										        <tr>
コード例 #5
0
ファイル: index.php プロジェクト: ruslan93/Site
<?php 
$gotit = 0;
require 'sys_sendmail.php';
if (isset($_POST['name']) && isset($_POST['button']) && isset($_POST['phone']) && isset($_POST['other'])) {
    send_mime_mail('Заказ', "*****@*****.**", "Заказчик", "*****@*****.**", "UTF-8", "UTF-8", "ЗАКАЗ", "Имя: " . $_POST['name'] . "\nПочта: " . $_POST['phone'] . "\nФорма: " . $_POST['other'] . "\nЦвет: " . $_POST['color'] . "\nКоличество: " . $_POST['quality']);
    $gotit = 1;
}
?>
<!DOCTYPE html>
<html>
<head>
    <title>Test</title>
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js">
    <script  src="carousel.js" type ="text/javascript"></script> 
    <link rel="stylesheet" type="text/css" href="css/styles-carousel.css"> 
    <link rel="stylesheet" type="text/css" href="style.css">
    <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,300,700&subset=latin,cyrillic' rel='stylesheet' type='text/css'>
    <script type="text/javascript" src="carousel.js"></script>  
    <link rel="stylesheet" href="nivo-zoom.css" type="text/css" media="screen" />
	  <script src="jquery.nivo.zoom.pack.js" type="text/javascript"></script>
    <link rel="stylesheet" type="text/css" href="css/styles-carousel.css"> 
    <link rel="stylesheet" href="assets/css/styles.css" />
    <link rel="stylesheet" href="assets/countdown/jquery.countdown.css" />

    <script type="text/javascript" src="js/libs/modernizr-2.6.1.min.js"></script>
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js"></script>
    <script type="text/javascript" src="http://code.jquery.com/ui/1.9.1/jquery-ui.js"></script>
    <script src="jquery.maskedinput.min.js"></script>  
    <script type="text/javascript" src="main.js"></script>  
    <link rel="stylesheet" href="http://code.jquery.com/ui/1.9.1/themes/base/jquery-ui.css" />  
</head>
コード例 #6
0
}
function clean_string($string)
{
    $bad = array("content-type", "bcc:", "to:", "cc:", "href");
    return str_replace($bad, "", $string);
}
//......................................
$email_to = "*****@*****.**";
// $email_to =  "*****@*****.**";
$email_subject = "Запрос со страницы МоторКлиники";
$success = "no";
if (isset($_POST['name']) && isset($_POST['email']) && isset($_POST['phone'])) {
    $name = $_POST['name'];
    $email_from = $_POST['email'];
    $phone = $_POST['phone'];
    $email_message = "Здравствуйте.\nДетали запроса со страницы МоторКлиники:\n\n";
    $email_message .= "Имя: " . clean_string($name) . "\n";
    $email_message .= "Email: " . clean_string($email_from) . "\n";
    $email_message .= "Телефон: " . clean_string($phone) . "\n";
    if (isset($_POST['content'])) {
        $email_message .= "Запрос: " . clean_string($_POST['content']) . "\n";
    }
    // // create email headers
    // $headers = 'From: '.$email_from."\r\n".
    // 'Reply-To: '.$email_from."\r\n" .
    // 'X-Mailer: PHP/' . phpversion();
    // @mail($email_to, $email_subject, $email_message, $headers);
    send_mime_mail('МоторКлиника', $email_from, $email_subject, $email_to, 'UTF-8', 'UTF-8', $email_subject, $email_message);
    $success = "success";
}
header('Location: index.php?message=' . $success);
コード例 #7
0
        $msg .= '<tr><td><strong>' . $locale->getBySmarty('field_main_price') . '</strong></td><td>' . $row['price'] . '</td></tr>';
        $msg .= '<tr><td valign="top"><strong>' . $locale->getBySmarty('field_main_description') . '</strong></td><td>' . nl2br($row['description']) . '</td></tr>';
        $msg .= '</table><br />';
        //adminisztracios linkek
        $msg .= '<table style="width: 100%;">';
        $msg .= '<tr><th colspan="2" style="text-align: left;">' . $locale->getBySmarty('mail_header3') . '</th></tr>';
        $msg .= '<tr><td style="width: 50%;"><strong>' . $locale->get('mail_activate_text4') . '</strong></td><td><a href=' . $_SESSION['site_sitehttp'] . '/index.php?' . $self_class . '&amp;act=del&amp;aid=' . $aid . '&amp;act_code=' . $act_code . ' title=' . $locale->get('mail_activate_delete') . '>' . $locale->get('mail_activate_delete') . '</a></td></tr>';
        $msg .= '<tr><td><strong>' . $locale->get('mail_activate_text3') . '</strong></td><td><a href=' . $_SESSION['site_sitehttp'] . '/index.php?' . $self_class . '&amp;act=mod&amp;aid=' . $aid . ' title=' . $locale->get('mail_activate_modify') . '>' . $locale->get('mail_activate_modify') . '</a></td></tr>';
        $msg .= '</table><br />';
        $msg .= $locale->getBySmarty('mail_activate_text5');
        if (is_file($tpl->template_dir . '/mail/mail_html.tpl')) {
            $tpl->assign('mail_body', $msg);
            $msg = $tpl->fetch('mail/mail_html.tpl');
        }
        include_once $include_dir . '/function.mail.php';
        send_mime_mail($row['email'], $locale->get('mail_subject_modify'), html_entity_decode(strip_tags($msg)), $msg, '"' . preg_replace('|"|', '\\"', $_SESSION['site_sitename']) . '" <' . $class_mail . '>');
        header('Location: index.php?success=classifieds_act&link=index.php%3F' . $self_class);
        exit;
    } else {
        $site_error[] = array('text' => $locale->get('error_no_activate'), 'link' => 'javascript:history.back(-1)');
        return;
    }
}
/**
 * hirdetes torlese
 */
if ($act == "del" && isset($_GET['aid']) && is_numeric($_GET['aid']) && !empty($_GET['act_code'])) {
    $aid = intval($_GET['aid']);
    $act_code = $_GET['act_code'];
    $query = "\n\t\tSELECT * \n\t\tFROM iShark_Classifieds_Advert \n\t\tWHERE advert_id = " . $aid . " AND is_active = 1 AND gen_code = '" . $act_code . "'\n\t";
    $result =& $mdb2->query($query);