Пример #1
0
}
try {
    if (!funcPdoConnect($pdo)) {
        throw new Exception("PDO::error:" . $pdo->errorCode() . ":" . $pdo->errorInfo());
    }
    //送信してきたメールアドレスの取得
    $stdin = fopen("php://stdin", "r");
    $email = "";
    while ($line = fgets($stdin)) {
        $line = trim($line);
        if (!$line || $email) {
            break;
        }
        // 送信元メールアドレスの取得
        if (eregi("^from:", $line) || eregi("^Return-Path:", $line)) {
            $email = getmail($line);
        }
    }
    funcPdoClear($arrNm, $arrVal, $arrType);
    $strQuery = "select * from m_member where member_mail=:member_mail";
    funcPdoParaSet(":member_mail", $email, PDO::PARAM_STR, $arrNm, $arrVal, $arrType);
    if (!($pdo_st = funcPdoExecute($pdo, $strQuery, $arrNm, $arrVal, $arrType))) {
        throw new Exception("PDO::error:" . $pdo->errorCode() . ":" . $pdo->errorInfo());
    }
    $sw_ari = 0;
    if ($pdo_st->rowCount() > 0) {
        $sw_ari = 1;
    }
    $enc_email = funcEncrypt($email, ENCRYPTION_KEY);
    //メール送信処理
    //送られてきたメールに、メール本文に送られてきたメールアドレスを記載して返す
Пример #2
0
/**
 * send an email when receiving a fresh comment
 *
 * @param unknown_type $posting
 * @param unknown_type $name
 * @param unknown_type $mail
 * @param unknown_type $web
 * @param unknown_type $message
 */
function notify($posting, $name, $mail, $web, $message)
{
    global $settings;
    if (empty($mail)) {
        $mail = "no mail address";
    }
    if (empty($web)) {
        $web = "no web address";
    }
    $authorid = $posting['author_id'];
    $to = getfullname($authorid) . " <" . getmail($authorid) . ">";
    $subject = "New comment on '" . $settings['sitename'] . "'";
    $name = entities_to_chars($name);
    $mail = entities_to_chars($mail);
    $web = entities_to_chars($web);
    $body = $name . " has left a comment for '" . $posting['title'] . "'\n";
    $body .= $settings['url'] . "/index.php?id=" . $posting['id'] . "\n\n";
    $body .= entities_to_chars(strip_tags($message)) . "\n\n";
    $body .= "Name: " . $name;
    if (!empty($mail)) {
        $body .= " / eMail: " . $mail;
        $showmail = $mail;
    } else {
        $showmail = getmail($authorid);
    }
    if ($web != "http://") {
        $body .= " / Web: " . $web;
    }
    //killing komma and semikolon
    $name = str_replace(",", " ", $name);
    $name = str_replace(";", " ", $name);
    $headers = "From: " . $name . " <" . $showmail . ">\r\n";
    mail($to, $subject, $body, $headers);
}
Пример #3
0
include_once "ini.dbstring.php";
include_once "mod.select.php";
include_once "mod.calendar.php";
include_once "mod.attendance.php";
include_once "ctrl.calendar.php";
include_once "ctrl.attendance.php";
//error_reporting(E_ALL);
//ini_set( 'display_errors','1');
sec_session_start();
$yr['0'] = $_SESSION['year'];
$yr['1'] = $_SESSION['month'];
//echo $yr['1'];
$out_limit = $_SESSION['sess_user_outtime'];
$in_limit = $_SESSION['sess_user_intime'];
$to = $_SESSION['sess_user_id'];
$rsesult = getmail($to, $db);
foreach ($rsesult as $row) {
    $tosend = $row['email'];
    //echo $tosend;
}
$getname = getusername($_SESSION['sess_user_id'], $db);
foreach ($getname as $result) {
    $fname = $result['user_name'];
    $eid = $result['user_eid'];
    //echo $eid;
}
$getCurrentMonth = getCurrentMonth($yr, $_SESSION['sess_user_id'], $db);
$to_mail = implode(", ", MailList(getHeaders(1, $db), 'to', $db));
$to_cc = implode(", ", MailList(getHeaders(1, $db), 'cc', $db));
$to_bcc = implode(", ", MailList(getHeaders(1, $db), 'bcc', $db));
$body = '<html>
Пример #4
0
    echo '<div class="message warning"> ' . $_SESSION["Others"] . ' </div>';
}
unset($_SESSION["Others"]);
unset($_SESSION["WarnMail"]);
?>
  
             <h2 id="lgo">Change E-mail!</h2>
              <div class="message info"> The fields with * is required <br/>
 
    </div>
     
             <form id="changemail" class="CreateForms" action="Inc/Changeemail.php" method="POST" name="changemail" onsubmit="return looks_like_email(document.getElementById('Newemail').value,document.getElementById('Newemail'))">
            <table class="TableForms">
                <tr>
                    <td>Current E-mail:</td><td><input type="text" id="Email" name="Email"  value="<?php 
echo "" . getmail() . "";
?>
" size="50" readonly/></td>
                </tr>
                        <tr>
                            <td>New E-mail:</td><td class="required"><input type="text" placeholder="New Email" id="Newemail" name="NewEmail"  value="" size="50" maxlength="45"  /> <span class="error" id="Mailerr"></span></td>
                        </tr>
                        <tr><td class="buttons"></td><td class="buttons"><input id="submit" name="submit" type="submit" value="Change email" /></td></tr>
                        <tr><td class="buttons"></td><td class="buttons"><input id="reset" name="reset" type="Reset" value="Reset" /></td></tr>
                    </table> 
        </form>
                  <br/><br/>
               </div>

<?php 
include 'Inc/footer.php';