Exemplo n.º 1
0
    $get_data = $_GET["cs"];
    if (count($get_data) > 1) {
        // data to send
        $os = $_GET["os"];
        $cs = $_GET["cs"];
        $ip = $_SERVER["REMOTE_ADDR"];
        //get city
        $ip = $_SERVER["REMOTE_ADDR"];
        @($geo = file_get_contents("http://freegeoip.net/json/" . $ip));
        @($geo = json_decode($geo, true));
        $title = "CallMe: обратный звонок";
        $title = "=?UTF-8?B?" . base64_encode($title) . "?=";
        $mess = "";
        $mess .= getOptions(1);
        addToMess("Откуда запрос", $geo['city'] . " / " . $geo['country_name'] . " / " . $ip);
        $mess = $mess . "<hr><a href='http://dedushka.org/tag/callme/'>Следите</a> за обновлениями.<br>Спасибо за использование Callme.";
        $headers = "Content-type: text/html; charset=utf-8 \r\n";
        $headers .= "From: Callme 2.1 <" . $from . ">\r\n";
        $sms["msg"] = translit(getOptions(0));
        $sms["msg"] = substr($sms["msg"], 0, 160);
        if ($to != "*****@*****.**") {
            @mail($to, $title, $mess, $headers);
        }
        if ($sms["id"] != "" || $sms["key"] != "" || $sms["log"] != "") {
            @sendSMS($num, $sms["msg"]);
        }
        jsAnswer("success", "c_success", "", "Спасибо, сообщение отправлено");
    } else {
        jsAnswer("error", "c_error", "", "Ошибка");
    }
}
Exemplo n.º 2
0
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);
        $mess = $mess . "<div style=\"background:#bfd4ac;border:1px solid #999;padding:10px;margin: 10px 0;\">IP: " . $ip . " / <a href='http://dedushka.org/whois/#" . $ip . "'>Определить город</a></div>";
        $headers = "Content-type: text/html; charset=utf-8\r\n";
        $headers .= "From: soapland <" . $from . ">\r\n";
        $sms['msg'] = translit(getOptions(0));
        $sms['msg'] = substr($sms['msg'], 0, 160);
        if ($to != '*****@*****.**') {
            mail($to, $title, $mess, $headers);
        }
        if ($sms['id'] != '' || $sms['key'] != '' || $sms['log'] != '') {
            @sendSMS($num, $sms['msg']);
        }
        jsAnswer('success', 'c_success', '', 'Спасибо, мы свяжемся с Вами в течении 30 минут!');
    } else {
        jsAnswer('error', 'c_error', '', 'Ошибка');
    }
}
Exemplo n.º 3
0
    $get_data = $_GET["cs"];
    if (count($get_data) > 1) {
        // data to send
        $os = $_GET["os"];
        $cs = $_GET["cs"];
        $ip = $_SERVER["REMOTE_ADDR"];
        //get city
        $ip = $_SERVER["REMOTE_ADDR"];
        @($geo = file_get_contents("http://freegeoip.net/json/" . $ip));
        @($geo = json_decode($geo, true));
        $title = "RES.ua: ПРЯМОЙ ЗАКАЗ";
        $title = "=?UTF-8?B?" . base64_encode($title) . "?=";
        $mess = "";
        $mess .= getOptions(1);
        addToMess("Откуда запрос", $geo['city'] . " / " . $geo['country_name'] . " / " . $ip);
        $mess = $mess . "<hr>";
        $headers = "Content-type: text/html; charset=utf-8 \r\n";
        $headers .= "From: RES.ua ЗАКАЗ<" . $from . ">\r\n";
        $sms["msg"] = translit(getOptions(0));
        $sms["msg"] = substr($sms["msg"], 0, 160);
        if ($to != "*****@*****.**") {
            @mail($to, $title, $mess, $headers);
        }
        if ($sms["id"] != "" || $sms["key"] != "" || $sms["log"] != "") {
            @sendSMS($num, $sms["msg"]);
        }
        jsAnswer("success", "c_success", "", "<center>OK</center>");
    } else {
        jsAnswer("error", "c_error", "", "<center>error</center>");
    }
}