function sendMessageToWM($admin_id, $from_mail, $real_from_mail, $from_name, $mail_subject, $txt_mail_body)
{
    $reception_body = "<p><convert>#label=227<convert> " . $from_name . ",<br /><convert>#label=228<convert></p>";
    //Bonjour //Votre message a été envoyé.\nIl sera traité dans les meilleurs délais.
    $reception_body .= "<p><convert>#label=229<convert> :</p>";
    //Votre message
    $reception_body .= "<hr /><p>";
    $reception_body .= stripslashes($txt_mail_body);
    $reception_body .= "</p><hr />";
    $reception_body .= getSignature();
    $reception_subject = "<convert>#label=229<convert> : " . $mail_subject;
    //Votre message
    //Send a msg to the admin :
    $mail_body = "<p><b>From : \"" . $from_name . "\" &lt;" . $from_mail . "&gt; " . $real_from_mail . "<br />";
    $mail_body .= "Object : " . $mail_subject . ".</b></p><p>" . stripslashes($txt_mail_body) . "</p>";
    if ($admin_id == "") {
        $mail_dest = getAdminContact();
    } else {
        $mail_dest = getContactForMessage($admin_id);
    }
    $mail_subject = "New message : " . $mail_subject;
    sendMail($mail_dest, $mail_subject, $mail_body, $from_mail);
    //Send a reception msg to the sender :
    sendMail($from_mail, $reception_subject, $reception_body, "", "", false);
}
Esempio n. 2
0
    }
    echo json_encode($data);
}
if (isset($_GET['keysearch2'])) {
    $key = $_GET['keysearch2'];
    $data = array();
    $result = getEmployerContactwithkey($key);
    while ($row = $result->fetch_assoc()) {
        $data[] = array("Name" => $row['firstname'], "email" => $row['email'], "contact" => $row['contact'], "address" => $row['address'], "pic" => $row['Profile_pic'], "type" => $row['type']);
    }
    echo json_encode($data);
}
if (isset($_GET['keysearchall'])) {
    $key = $_GET['keysearchall'];
    $data = array();
    $result = getAdminContact();
    while ($row = $result->fetch_assoc()) {
        $data[] = array("Name" => $row['Admin_Name'], "email" => $row['Email'], "contact" => $row['Contact'], "address" => $row['Address'], "pic" => $row['Profile_pic']);
    }
    echo json_encode($data);
}
if (isset($_GET['keysearchall2'])) {
    $key = $_GET['keysearchall2'];
    $data = array();
    $result = getEmployerContact();
    while ($row = $result->fetch_assoc()) {
        $data[] = array("Name" => $row['firstname'], "email" => $row['email'], "contact" => $row['contact'], "address" => $row['address'], "pic" => $row['Profile_pic'], "type" => $row['type']);
    }
    echo json_encode($data);
}
if (isset($connection)) {
Esempio n. 3
0
function sendErrorMail($error_id, $frame)
{
    $data = getObjectData($error_id, "T_error");
    $date = date('l dS \\of F Y h:i:s A');
    $mail_dest = getAdminContact();
    $subject = " " . $frame . " ERROR !";
    $mail_body = $data;
    $mail_body .= "\nUser id : ";
    $mail_body .= $_SESSION['user_id'] . "\n";
    $mail_body .= "Date time : ";
    $mail_body .= $date . "\n";
    $mail_body .= "<b>Error id : " . $error_id . "</b>\n";
    $mail_body .= "<b>Source frame : ";
    $mail_body .= $frame . "</b>\n";
    $mail_body .= print_r(getDataFromSQL("SHOW PROCESSLIST", __FILE__, "function", __FUNCTION__), true) . "\n";
    $mail_body .= print_r(explode('  ', mysql_stat()), true) . "\n";
    sendMail($mail_dest, $subject, nl2br($mail_body));
}