Source for file LC_Page_Magazine_Confirm.php
Documentation is available at LC_Page_Magazine_Confirm.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");
* FIXME dtb_customer_mail なんて無いよ...
* @author LOCKON CO.,LTD.
* @version $Id: LC_Page_Magazine_Confirm.php 17590 2008-09-02 07:17:59Z Seasoft $
if (isset
($_REQUEST['btnRegist'])) {
if (count($this->arrErr) ==
0) {
$this->arrForm['kind'] =
'メルマガ登録';
$this->arrForm['type'] =
'regist';
$this->arrForm['mail'] =
$this->arrForm['regist'];
} elseif (isset
($_REQUEST['btnCancel'])) {
if (count($this->arrErr) ==
0) {
$this->arrForm['kind'] =
'メルマガ解除';
$this->arrForm['type'] =
'cancel';
$this->arrForm['mail'] =
$this->arrForm['cancel'];
} elseif ($_REQUEST['mode'] ==
'regist' or $_REQUEST['mode'] ==
'cancel') {
if ($_REQUEST['mode'] ==
'regist') {
$subject =
$helperMail->fMakesubject($objQuery, $objMailText, $this, 'メルマガ登録のご確認');
} elseif ($_REQUEST['mode'] ==
'cancel') {
$subject =
$helperMail->sfMakesubject('メルマガ解除のご確認');
$CONF =
$objDb->sf_getBasisData();
$this->tpl_url =
SC_Utils_Ex::gfAddSessionId(MOBILE_SSL_URL .
"magazine/" .
$_REQUEST['mode'] .
".php?id=" .
$uniqId);
$objMailText->assignobj($this);
$toCustomerMail =
$objMailText->fetch("mail_templates/mailmagazine_" .
$_REQUEST['mode'] .
".tpl");
, $CONF["email03"] // 配送元アドレス
, $CONF["shop_name"] // 配送元 名前
, $CONF["email03"] // reply_to
, $CONF["email04"] // return_path
, $CONF["email04"] // Errors_to
, $CONF["email01"] // Bcc
$objMail->setTo($_POST["email"], $_POST["email"]);
SC_Utils_Ex::sfDispSiteError(CUSTOMER_ERROR, "", false, "", true);
$objLayout->sfGetPageLayout($this, false, DEF_LAYOUT);
$objView->assignobj($this);
$objView->display(SITE_FRAME);
array('メールアドレス', $dataName, MTEXT_LEN) ,
array("NO_SPTAB", "EXIST_CHECK", "EMAIL_CHECK",
"SPTAB_CHECK" ,"EMAIL_CHAR_CHECK", "MAX_LENGTH_CHECK", "MOBILE_EMAIL_CHECK"));
if (count($objErr->arrErr) ==
0) {
if ($dataName ==
'regist' and $flg ==
true) {
$objErr->arrErr[$dataName] =
"既に登録されています。<br>";
} elseif ($dataName ==
'cancel' and $flg ==
false) {
$objErr->arrErr[$dataName] =
"メルマガ登録がされていません。<br>";
$count =
$objConn->getOne("SELECT COUNT(*) FROM dtb_customer_mail WHERE secret_key = ?", array($uniqid));
$arrRegist["email"] =
$email; // メールアドレス
$arrRegist["mail_flag"] =
5; // 登録状態
$arrRegist["secret_key"] =
$uniqid; // ID発行
$arrRegist["create_date"] =
"now()"; // 作成日
$arrRegist["update_date"] =
"now()"; // 更新日
$objConn->query("BEGIN");
$sql =
"SELECT count(*) FROM dtb_customer_mail WHERE email = ?";
$mailResult =
$objConn->getOne($sql, array($arrRegist["email"]));
$objQuery->update("dtb_customer_mail", $arrRegist, "email = " .
SC_Utils_Ex::sfQuoteSmart($arrRegist["email"]));
$objQuery->insert("dtb_customer_mail", $arrRegist);
$objConn->query("COMMIT");
$sql =
"SELECT secret_key FROM dtb_customer_mail WHERE email = ?";
$uniqid =
$objConn->getOne($sql, array($email));
$count =
$objConn->getOne("SELECT COUNT(*) FROM dtb_customer_mail WHERE secret_key = ?", array($uniqid));
$objQuery->update("dtb_customer_mail", array('secret_key' =>
$uniqid), "email = " .
SC_Utils_Ex::sfQuoteSmart($email));
$sql =
"SELECT email, mailmaga_flg FROM dtb_customer_mail WHERE email = ?";
$mailResult =
$objConn->getRow($sql, array($email));
if (count($mailResult) ==
0 or ($mailResult[1] !=
null and $mailResult[1] !=
2 )) {
Documentation generated on Tue, 28 Apr 2009 18:12:23 +0900 by phpDocumentor 1.4.2