Ejemplo n.º 1
0
 if (filter_var($Email, FILTER_VALIDATE_EMAIL) !== false) {
     if ($Password == $Password_Confirm) {
         if (request_confirm('Licence')) {
             $req_pseudo = get_select_req('request_account', $_POST);
             $Pseudo_List = get_db($req_pseudo);
             if (empty($Pseudo_List)) {
                 $record = true;
                 $Date = date('Y-m-d H:i:s');
                 $IP = getRealIpAddr();
                 $filter = uniqid();
                 $pswd = password_encode($prefixe_salt . $filter . $suffixe_salt, $Password);
                 $key = uniqid();
                 insert_db('Caranille_Accounts', array('Account_Pseudo' => $Pseudo, 'Account_Password' => $pswd, 'Account_Salt' => $filter, 'Account_Email' => $Email, 'Account_Last_Connection' => $Date, 'Account_Inscription' => $Date, 'Account_Last_IP' => $IP, 'Account_HP_Remaining' => 100, 'Account_Key' => $key, 'Account_valid' => 0, 'Account_Level' => 1, 'Account_Order' => 1, 'Account_Reason' => 'None', 'Account_Status' => "Authorized", 'Account_Access' => "Member", 'Account_Guild_ID' => 0, 'Account_HP_Bonus' => 0, 'Account_MP_Remaining' => 10, 'Account_MP_Bonus' => 0, 'Account_Strength_Bonus' => 0, 'Account_Magic_Bonus' => 0, 'Account_Agility_Bonus' => 0, 'Account_Defense_Bonus' => 0, 'Account_Experience' => 0, 'Account_Golds' => 0, 'Account_Notoriety' => 0, 'Account_Chapter' => 1, 'Account_Mission' => 1));
                 $user_record = get_db($req_pseudo);
                 if (!empty($user_record)) {
                     register_email($user_record);
                     for ($i = 1; $i <= 5; $i++) {
                         insert_db('Caranille_Inventory', array('Inventory_Account_ID' => $user_record['Account_ID'], 'Inventory_Item_ID' => $i, 'Inventory_Item_Quantity' => 1, 'Inventory_Item_Equipped' => 'Yes'));
                     }
                 }
             } else {
                 $baseline = 'Ce Pseudo est déjà utilisé';
             }
         } else {
             $baseline = 'Vous devez accepter le règlement pour vous inscrire';
         }
     } else {
         $baseline = 'Les deux mots de passes entrée ne sont pas identiques';
     }
 } else {
     $baseline = "le mail n'est pas au format valide";
Ejemplo n.º 2
0
$sent_by = $_SESSION["authId"];
$msg_type = xl('Email from Batchcom');
while ($row = sqlFetchArray($res)) {
    // prepare text for ***NAME*** tag
    $pt_name = $row['title'] . ' ' . $row['fname'] . ' ' . $row['lname'];
    $pt_email = $row['email'];
    $email_subject = $_POST['email_subject'];
    $email_body = $_POST['email_body'];
    $email_subject = ereg_replace('\\*{3}NAME\\*{3}', $pt_name, $email_subject);
    $email_body = ereg_replace('\\*{3}NAME\\*{3}', $pt_name, $email_body);
    $headers = "MIME-Version: 1.0\r\n";
    $headers .= "To: {$pt_name}<" . $pt_email . ">\r\n";
    $headers .= "From: <" . $email_sender . ">\r\n";
    $headers .= "Reply-to: <" . $email_sender . ">\r\n";
    $headers .= "X-Priority: 3\r\n";
    $headers .= "X-Mailer: PHP mailer\r\n";
    if (mail($pt_email, $email_subject, $email_body, $headers)) {
        echo "<br>Email sent to {$pt_name} at {$pt_email}";
        $patient_id = $row['id'];
        register_email($patient_id, $sent_by, $msg_type, $email_subject, $email_body);
    } else {
        $m_error = TRUE;
        $m_error_count++;
    }
}
if ($m_error) {
    echo "xl('Could not send email due to a server problem, ','','<br>). {$m_error_count} . xl(' emails not sent','','','<br>')";
}
?>