コード例 #1
0
ファイル: addmail_m.php プロジェクト: ATS001/PRSIT
function sendmail($nom, $mail, $pseaudo, $mdp, $prenom)
{
    $user_name = $pseaudo;
    $user_mail = $mail;
    $user_fname = $nom;
    $user_lname = $prenom;
    $urlwebmail = 'http://m.commerce.gouv.td';
    include_once MSG_REP . 'addmail.php';
    $args = array('isHTML' => true, 'debug' => true, 'to' => $user_fname . '  ' . $user_lname . '<' . $user_mail . '>', 'from' => 'Administrateur Système' . '<*****@*****.**>', 'subject' => 'Création du compte Email ', 'message' => $fullmesage, 'charset' => 'utf-8', 'errorMsg' => 'Error!', 'successMsg' => '');
    $email = new Mymail($args);
    if ($email->send()) {
        return true;
    } else {
        return false;
    }
}
コード例 #2
0
ファイル: forgotajax_c.php プロジェクト: ATS001/MRN
    if (!valid_captcha($captcha)) {
        echo 2;
        exit;
    } else {
        $array = $db->RowArray();
        $user_name = $array['nom'];
        $user_mail = $array['mail'];
        $user_fname = $array['fnom'];
        $user_lname = $array['lnom'];
        $user_id = $array['id'];
        $tkenforgot = md5($_SESSION['Captcha']);
        $urlrecovery = 'http://localhost/E-ONAPE/?_tsk=recovery&token=' . $tkenforgot;
        include_once MSG_REP . 'forgot.php';
        $args = array('isHTML' => true, 'debug' => true, 'to' => $user_fname . '  ' . $user_lname . '<' . $user_mail . '>', 'from' => utf8_decode('Administrateur Système') . '<*****@*****.**>', 'subject' => 'Demande de réinitialisation du mot de passe Système ', 'message' => $fullmesage, 'charset' => 'utf-8', 'errorMsg' => 'Error!', 'successMsg' => '');
        $email = new Mymail($args);
        $email->send();
        $sql = "INSERT INTO `forgot` (`id`, `user`, `etat`, `dat`,expir) VALUES ('" . $tkenforgot . "', '" . $user_name . "',                  0,CURRENT_TIMESTAMP,DATE_ADD(CURRENT_TIMESTAMP,INTERVAL 2 DAY))";
        if (!$db->Query($sql)) {
            $db->Kill('');
        }
        echo 0;
        exit;
    }
} else {
    echo 1;
    return false;
}
//end else passworde
function valid_captcha($captcha)
{
    if (trim($captcha) == $_SESSION['Captcha']) {