Esempio n. 1
0
            $i++;
        }
        $opts .= '</div>';
    } else {
        foreach ($os as $value) {
            if (strlen($value) != 0 && $value != "0") {
                $opts .= $cs[$i] . "(" . $value . ") ";
            }
            $i++;
        }
    }
    return $opts;
}
$time = time();
// время отправки
$interval = $time - gF("ctime");
if ($interval < 1) {
    // интервал отправки (сек)
    jsAnswer("error", "c_error", "", "Сообщение уже было отправлено.");
} else {
    //$get_data = gF('os');
    $get_data = $_POST["cs"];
    if (count($get_data) > 1) {
        // data to send
        $os = $_POST["os"];
        $cs = $_POST["cs"];
        $ip = $_SERVER["REMOTE_ADDR"];
        $title = "Новый клиент с сайта soapland";
        $title = "=?UTF-8?B?" . base64_encode($title) . "?=";
        $mess = "";
        $mess .= getOptions(1);
Esempio n. 2
0
    $tr = array("А" => "A", "Б" => "B", "В" => "V", "Г" => "G", "Д" => "D", "Е" => "E", "Ё" => "E", "Ж" => "J", "З" => "Z", "И" => "I", "Й" => "Y", "К" => "K", "Л" => "L", "М" => "M", "Н" => "N", "О" => "O", "П" => "P", "Р" => "R", "С" => "S", "Т" => "T", "У" => "U", "Ф" => "F", "Х" => "H", "Ц" => "C", "Ч" => "4", "Ш" => "SH", "Щ" => "SC", "Ъ" => "", "Ы" => "Y", "Ь" => "", "Э" => "E", "Ю" => "U", "Я" => "YA", "а" => "a", "б" => "b", "в" => "v", "г" => "g", "д" => "d", "е" => "e", "ё" => "e", "ж" => "j", "з" => "z", "и" => "i", "й" => "y", "к" => "k", "л" => "l", "м" => "m", "н" => "n", "о" => "o", "п" => "p", "р" => "r", "с" => "s", "т" => "t", "у" => "u", "ф" => "f", "х" => "h", "ц" => "c", "ч" => "4", "ш" => "sh", "щ" => "sch", "ъ" => "y", "ы" => "y", "ь" => "", "э" => "e", "ю" => "u", "я" => "ya");
    return strtr($str, $tr);
}
// далее можно не трогать
$time = time();
// время отправки
$interval = $time - gF("time");
if ($interval < 20) {
    // если прошло менее (сек)
    echoResult("err", "b1c-err", "", $l["sent"]);
} else {
    $get_data = $_GET["cs"];
    if (count($get_data) > 1) {
        // data to send
        $ip = $_SERVER['REMOTE_ADDR'];
        $prd = gF("prd");
        $geo = @file_get_contents("http://freegeoip.net/json/" . $ip);
        $geo = @json_decode($geo, true);
        $title = $l["title"];
        $title = "=?UTF-8?B?" . base64_encode($title) . "?=";
        $mess = "<h3>Заказ на " . $prd . "</h3><div style='background:#fffce8;border:1px solid #cdc485;padding:0 10px'>";
        $mess .= getOptions(1);
        $mess .= "</div><div style=\"background: #f9f2f4; border: 1px solid #c7254e;padding:0 10px;margin-top:10px;\">";
        $mess .= addToMess("IP", $ip);
        $mess .= addToMess("Откуда запрос", $geo['city'] . " (" . $geo['country_name'] . ")");
        $mess .= "</div>" . $l["footer"];
        $headers = "Content-type: text/html; charset=utf-8 \r\n";
        $headers .= "From: garant.kuvalda.by <" . $from . ">\r\n";
        $sms["msg"] = substr(translit($prd . "," . getOptions(0)), 0, 160);
        if (strlen($to) > 5 && $to != "yourMail") {
            @mail($to, $title, $mess, $headers);