Source for file LC_Page_Forgot.php
Documentation is available at LC_Page_Forgot.php
* This file is part of EC-CUBE
* Copyright(c) 2000-2007 LOCKON CO.,LTD. All Rights Reserved.
* http://www.lockon.co.jp/
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
require_once(CLASS_PATH .
"pages/LC_Page.php");
* @author LOCKON CO.,LTD.
* @version $Id:LC_Page_Forgot.php 15532 2007-08-31 14:39:46Z nanasess $
if (defined("MOBILE_SITE") &&
MOBILE_SITE) {
$CONF =
$objDb->sf_getBasisData();
$arrReminder =
$masterData->getMasterData("mtb_reminder");
if (!isset
($_POST['mode'])) $_POST['mode'] =
"";
if (!isset
($_POST['email'])) $_POST['email'] =
"";
if ( $_POST['mode'] ==
'mail_check' ){
// FIXME DBチェックの前に妥当性チェックするべき
$sql =
"SELECT * FROM dtb_customer WHERE (email = ? OR email_mobile = ?) AND status = 2 AND del_flg = 0";
$result =
$conn->getAll($sql, array($_POST['email'], $_POST['email']) );
if (isset
($result[0]['reminder']) &&
$result[0]['reminder']){
$_SESSION['forgot']['email'] =
$_POST['email'];
$_SESSION['forgot']['reminder'] =
$result[0]['reminder'];
$this->Reminder =
$arrReminder[$_SESSION['forgot']['reminder']];
$sql =
"SELECT customer_id FROM dtb_customer WHERE (email = ? OR email_mobile = ?) AND status = 1 AND del_flg = 0"; //仮登録中の確認
$result =
$conn->getAll($sql, array($_POST['email'], $_POST['email']) );
$this->errmsg =
"ご入力のemailアドレスは現在仮登録中です。<br>登録の際にお送りしたメールのURLにアクセスし、<br>本会員登録をお願いします。";
$this->errmsg =
"ご入力のemailアドレスは登録されていません";
} elseif( $_POST['mode'] ==
'secret_check' ){
if ( $_SESSION['forgot']['email'] ) {
$sql =
"SELECT * FROM dtb_customer WHERE (email = ? OR email_mobile = ?) AND del_flg = 0";
$result =
$conn->getAll($sql, array($_SESSION['forgot']['email'], $_SESSION['forgot']['email']));
if ( $data['reminder_answer'] ===
$_POST['input_reminder'] ){
$sql =
"UPDATE dtb_customer SET password = ?, update_date = now() WHERE customer_id = ?";
$conn->query( $sql, array( sha1($this->temp_password .
":" .
AUTH_MAGIC) ,$data['customer_id']) );
$_SESSION['forgot'] =
array();
unset
($_SESSION['forgot']);
$this->Reminder =
$arrReminder[$_SESSION['forgot']['reminder']];
$this->errmsg =
"パスワードを忘れたときの質問に対する回答が正しくありません";
// アクセス元が不正または、セッション保持期間が切れている
$this->errmsg =
"emailアドレスを再度登録してください。<br />前回の入力から時間が経っていますと、本メッセージが表示される可能性があります。";
if($_POST['email'] !=
"") {
if (defined("MOBILE_SITE") &&
MOBILE_SITE) {
$objView->assignobj($this);
* @param array $CONF 店舗基本情報の配列
* @param string $email 送信先メールアドレス
* @param string $customer_name 送信先氏名
* @param string $temp_password 変更後のパスワード
function lfSendMail($CONF, $email, $customer_name, $temp_password){
$this->customer_name =
$customer_name;
$objMailText->assignobj($this);
$toCustomerMail =
$objMailText->fetch("mail_templates/forgot_mail.tpl");
, "パスワードが変更されました" .
"【" .
$CONF["shop_name"].
"】" // サブジェクト
, $CONF["email03"] // 配送元アドレス
, $CONF["shop_name"] // 配送元 名前
, $CONF["email03"] // reply_to
, $CONF["email04"] // return_path
, $CONF["email04"] // Errors_to
$objMail->setTo($email, $customer_name .
" 様");
if (MOBILE_USE_KARA_MAIL) {
$token =
$objMobile->gfPrepareKaraMail('forgot/' .
DIR_INDEX_URL);
$objPage->tpl_kara_mail_to =
MOBILE_KARA_MAIL_ADDRESS_USER .
MOBILE_KARA_MAIL_ADDRESS_DELIMITER .
'forgot_' .
$token .
'@' .
MOBILE_KARA_MAIL_ADDRESS_DOMAIN;
Documentation generated on Tue, 28 Apr 2009 18:12:11 +0900 by phpDocumentor 1.4.2