Exemplo n.º 1
0
<?php

die('<p style="font-size:36px;color:black;font-weight:bold;">404!</p>');
if (isset($_POST['FORM'])) {
    require_once HOST . '/captcha/securimage.php';
    $image = new Securimage();
    if (!$image->check($_POST['hislo'])) {
        Message::GetMessage(0, v::getI18n('message_error_captcha'));
    } else {
        $data = array();
        foreach ($_POST['FORM'] as $key => $value) {
            if ($key == 'message') {
                $data[$key] = nl2br(filter::varpost($value));
            } else {
                $data[$key] = filter::varpost($value);
            }
        }
        //----------------------------------------------
        // формируем письмо и отправляем его АДМИНУ
        //----------------------------------------------
        $to = $GLOBALS['mailadmin'];
        $from = $data['email'];
        $subject = ADRESS_SITE . ', ' . __('form_subject_from');
        $message = system::show_tpl($data, 'frontend/contact/contact_mail_admin.tpl.php');
        sent_email_new($to, $message, "", $subject, $from);
        //----------------------------------------------
        // формируем письмо и отправляем его ЮЗЕРУ
        //----------------------------------------------
        $to = $data['email'];
        $from = $GLOBALS['mailadmin'];
        $subject = __('mail_from_site') . ' ' . ADRESS_SITE . ', ' . __('form_subject_from');