/** * 正会員登録完了メール送信 * * @param string $registSecretKey * @access private * @return void */ public function lfSendRegistMail($registSecretKey) { $objQuery = SC_Query_Ex::getSingletonInstance(); $objCustomer = new SC_Customer_Ex(); $objHelperMail = new SC_Helper_Mail_Ex(); $objHelperMail->setPage($this); $CONF = SC_Helper_DB_Ex::sfGetBasisData(); //-- 会員データを取得 $arrCustomer = $objQuery->select('*', 'dtb_customer', 'secret_key = ?', array($registSecretKey)); $data = $arrCustomer[0]; $objCustomer->setLogin($data['email']); //-- メール送信 $objMailText = new SC_SiteView_Ex(); $objMailText->setPage($this); $objMailText->assign('CONF', $CONF); $objMailText->assign('name01', $data['name01']); $objMailText->assign('name02', $data['name02']); $toCustomerMail = $objMailText->fetch('mail_templates/customer_regist_mail.tpl'); $subject = $objHelperMail->sfMakesubject('会員登録が完了しました。'); $objMail = new SC_SendMail_Ex(); $objMail->setItem('', $subject, $toCustomerMail, $CONF['email03'], $CONF['shop_name'], $CONF['email03'], $CONF['email04'], $CONF['email04']); // 宛先の設定 $name = $data['name01'] . $data['name02'] . ' 様'; $objMail->setTo($data['email'], $name); $objMail->sendMail(); }
/** * 正会員登録完了メール送信 * * @param mixed $registSecretKey * @access private * @return void */ function lfSendRegistMail($registSecretKey) { $objQuery = SC_Query_Ex::getSingletonInstance(); $objCustomer = new SC_Customer_Ex(); $objHelperMail = new SC_Helper_Mail_Ex(); $CONF = SC_Helper_DB_Ex::sfGetBasisData(); //-- 会員データを取得 $arrCustomer = $objQuery->select("*", "dtb_customer", "secret_key = ?", array($registSecretKey)); $data = $arrCustomer[0]; $objCustomer->setLogin($data['email']); //-- メール送信 $objMailText = new SC_SiteView_Ex(); $objMailText->assign('CONF', $CONF); $objMailText->assign("name01", $data["name01"]); $objMailText->assign("name02", $data["name02"]); $toCustomerMail = $objMailText->fetch("mail_templates/customer_regist_mail.tpl"); $subject = $objHelperMail->sfMakesubject('会員登録が完了しました。'); $objMail = new SC_SendMail(); $objMail->setItem('', $subject, $toCustomerMail, $CONF["email03"], $CONF["shop_name"], $CONF["email03"], $CONF["email04"], $CONF["email04"]); // 宛先の設定 $name = $data["name01"] . $data["name02"] . " 様"; $objMail->setTo($data['email'], $name); $objMail->sendMail(); }
function setLoginInfo(&$customer) { $objCustomer = new SC_Customer_Ex(); $customer["status"] = 2; $customer["carrier"] = 2; $customer["last_login_useragent"] = $_SERVER["HTTP_USER_AGENT"]; $customer["last_login_date"] = "CURRENT_TIMESTAMP"; $customer["secret_key"] = SC_Helper_Customer_Ex::sfGetUniqSecretKey(); GC_Utils_Ex::gfPrintLog(print_r($customer, true), DEBUG_LOG_REALFILE); SC_Helper_Customer_Ex::sfEditCustomerData($customer, $customer["customer_id"]); $objCustomer->setLogin($customer["email"]); if ($objCustomer->isLoginSuccess()) { $this->tpl_login = true; $this->tpl_point = $objCustomer->getValue("point"); $this->tpl_customer_id = $objCustomer->getValue("customer_id"); $this->tpl_first_buy_date = $objCustomer->getValue("first_buy_date"); $this->tpl_carrier = $objCustomer->getValue("carrier"); } $this->sendRedirectPage(); }
/** * Page のプロセス * @return void */ public function action() { //決済処理中ステータスのロールバック $objPurchase = new SC_Helper_Purchase_Ex(); $objPurchase->cancelPendingOrder(PENDING_ORDER_CANCEL_FLAG); $objFormParam = new SC_FormParam_Ex(); // PC時は規約ページからの遷移でなければエラー画面へ遷移する if ($this->lfCheckReferer() === false) { SC_Utils_Ex::sfDispSiteError(PAGE_ERROR, '', true); } SC_Helper_Customer_Ex::sfCustomerEntryParam($objFormParam); $objFormParam->setParam($_POST); // mobile用(戻るボタンでの遷移かどうかを判定) if (!empty($_POST['return'])) { $_REQUEST['mode'] = 'return'; } switch ($this->getMode()) { case 'confirm': if (isset($_POST['submit_address'])) { // 入力エラーチェック $this->arrErr = $this->lfCheckError($_POST); // 入力エラーの場合は終了 if (count($this->arrErr) == 0) { // 郵便番号検索文作成 $zipcode = $_POST['zip01'] . $_POST['zip02']; // 郵便番号検索 $arrAdsList = SC_Utils_Ex::sfGetAddress($zipcode); // 郵便番号が発見された場合 if (!empty($arrAdsList)) { $data['pref'] = $arrAdsList[0]['state']; $data['addr01'] = $arrAdsList[0]['city'] . $arrAdsList[0]['town']; $objFormParam->setParam($data); // 該当無し } else { $this->arrErr['zip01'] = '※該当する住所が見つかりませんでした。<br>'; } } break; } //-- 確認 $this->arrErr = SC_Helper_Customer_Ex::sfCustomerEntryErrorCheck($objFormParam); // 入力エラーなし if (empty($this->arrErr)) { //パスワード表示 $this->passlen = SC_Utils_Ex::sfPassLen(strlen($objFormParam->getValue('password'))); $this->tpl_mainpage = 'entry/confirm.tpl'; $this->tpl_title = '会員登録(確認ページ)'; } break; case 'complete': //-- 会員登録と完了画面 $this->arrErr = SC_Helper_Customer_Ex::sfCustomerEntryErrorCheck($objFormParam); if (empty($this->arrErr)) { $uniqid = $this->lfRegistCustomerData($this->lfMakeSqlVal($objFormParam)); $this->lfSendMail($uniqid, $objFormParam->getHashArray()); // 仮会員が無効の場合 if (CUSTOMER_CONFIRM_MAIL == false) { // ログイン状態にする $objCustomer = new SC_Customer_Ex(); $objCustomer->setLogin($objFormParam->getValue('email')); } // 完了ページに移動させる。 SC_Response_Ex::sendRedirect('complete.php', array('ci' => SC_Helper_Customer_Ex::sfGetCustomerId($uniqid))); } break; case 'return': // quiet. break; default: break; } $this->arrForm = $objFormParam->getFormParamList(); }
/** * Page のプロセス * @return void */ function action() { $objFormParam = new SC_FormParam_Ex(); SC_Helper_Customer_Ex::sfCustomerEntryParam($objFormParam); $objFormParam->setParam($_POST); $arrForm = $objFormParam->getHashArray(); // PC時は規約ページからの遷移でなければエラー画面へ遷移する if ($this->lfCheckReferer($arrForm, $_SERVER['HTTP_REFERER']) === false) { SC_Utils_Ex::sfDispSiteError(PAGE_ERROR, '', true); } // mobile用(戻るボタンでの遷移かどうかを判定) if (!empty($arrForm['return'])) { $_POST['mode'] = 'return'; } switch ($this->getMode()) { case 'confirm': if (isset($_POST['submit_address'])) { // 入力エラーチェック $this->arrErr = $this->lfCheckError($_POST); // 入力エラーの場合は終了 if (count($this->arrErr) == 0) { // 郵便番号検索文作成 // $zipcode = $_POST['zip01'] . $_POST['zip02']; $zipcode = $_POST['zipcode']; // 郵便番号検索 $arrAdsList = SC_Utils_Ex::sfGetAddress($zipcode); // 郵便番号が発見された場合 if (!empty($arrAdsList)) { $data['pref'] = $arrAdsList[0]['state']; $data['addr01'] = $arrAdsList[0]['city'] . $arrAdsList[0]['town']; $objFormParam->setParam($data); // 該当無し } else { $this->arrErr['zipcode'] = t('c_* The corresponding address was not found.<br />_01'); } } $this->arrForm = $objFormParam->getHashArray(); break; } //-- 確認 $this->arrErr = SC_Helper_Customer_Ex::sfCustomerEntryErrorCheck($objFormParam); $this->arrForm = $objFormParam->getHashArray(); // 入力エラーなし if (empty($this->arrErr)) { //パスワード表示 $this->passlen = SC_Utils_Ex::sfPassLen(strlen($this->arrForm['password'])); $this->tpl_mainpage = 'entry/confirm.tpl'; $this->tpl_title = t('c_Member registration_01'); } break; case 'complete': //-- 会員登録と完了画面 $this->arrErr = SC_Helper_Customer_Ex::sfCustomerEntryErrorCheck($objFormParam); $this->arrForm = $objFormParam->getHashArray(); if (empty($this->arrErr)) { $uniqid = $this->lfRegistCustomerData($this->lfMakeSqlVal($objFormParam)); $this->lfSendMail($uniqid, $this->arrForm); // 仮会員が無効の場合 if (CUSTOMER_CONFIRM_MAIL == false) { // ログイン状態にする $objCustomer = new SC_Customer_Ex(); $objCustomer->setLogin($this->arrForm['email']); } // 完了ページに移動させる。 SC_Response_Ex::sendRedirect('complete.php', array('ci' => SC_Helper_Customer_Ex::sfGetCustomerId($uniqid))); } break; case 'return': $this->arrForm = $objFormParam->getHashArray(); break; default: break; } }
function init() { parent::init(); $objCustomer = new SC_Customer_Ex(); if (isset($_GET["sid"]) && isset($_GET["admin"])) { $sid = $_REQUEST["sid"]; $email = $objCustomer->getValue("email"); $osid = session_id(); if ($osid != $sid) { session_destroy(); session_id($sid); session_start(); } $objCustomer->setLogin($email); $get = $_GET; unset($get["sid"]); SC_Response_Ex::reload($get, true); } $objQuery = SC_Query_Ex::getSingletonInstance(); $objProduct = new SC_Product_Ex(); if (GC_Utils_Ex::isFrontFunction() && $this->skip_load_page_layout == false) { $objCustomer = new SC_Customer_Ex(); // 画面更新毎に情報を更新する if ($objCustomer->isLoginSuccess()) { // 初回アクセス時に更新 $objCustomer->updateSession(); $this->tpl_login = true; $this->tpl_point = $objCustomer->getValue("point"); $this->tpl_customer_id = $objCustomer->getValue("customer_id"); $this->tpl_first_buy_date = $objCustomer->getValue("first_buy_date"); $this->tpl_carrier = $objCustomer->getValue("carrier"); $downloadable_days = $this->arrSiteInfo["downloadable_days"]; $downloadable_days_unlimited = $this->arrSiteInfo["downloadable_days_unlimited"]; $date = null; if ($downloadable_days_unlimited) { $date = SC_Utils_Ex::sfGetTimestamp(RELEASE_YEAR, 1, 1, false); $date2 = SC_Utils_Ex::sfGetTimestamp(9999, 12, 31, false); } else { $xdate = strtotime("-{$downloadable_days} day"); $date = SC_Utils_Ex::sfGetTimestamp(date("Y", $xdate), date("m", $xdate), date("d", $xdate), false); $xdate = strtotime("+{$downloadable_days} day"); $date2 = SC_Utils_Ex::sfGetTimestamp(date("Y", $xdate), date("m", $xdate), date("d", $xdate), false); } $this->downloadable_days = $date; $this->downloadable_days2 = $date2; $objPurchase = new SC_Helper_Purchase_Ex(); $arrOrderId = $objQuery->getCol("order_id", "dtb_order", "payment_date > ? AND customer_id = ?", array($date, $this->tpl_customer_id)); $this->arrRedownloadProduct = array(); foreach ($arrOrderId as $order_id) { $arrOrderDetail = $objPurchase->getOrderDetail($order_id, true); $this->arrRedownloadProduct = array_merge($this->arrRedownloadProduct, $arrOrderDetail); } // 再ダウンロード可能な商品一覧 $this->arrRedownloadProduct = SC_Utils_Ex::makeArrayIDToKey("product_id", $this->arrRedownloadProduct); foreach ($this->arrRedownloadProduct as $product_id => $row) { $row["product"] = $objProduct->getDetail($product_id); $this->arrRedownloadProduct[$product_id] = $row; } } else { $this->tpl_login = false; $this->tpl_point = 0; $this->tpl_customer_id = 0; $this->tpl_first_buy_date = null; $this->tpl_carrier = 9; $this->arrRedownloadProduct = array(); } $objDb = new SC_Helper_DB_Ex(); if ($objDb->sfColumnExists("cp_dtb_customer_transaction", "id")) { $where = " customer_id = ? AND transaction_status = ? AND continue_account_id IS NOT NULL AND del_flg = 0"; $arrWhereVal = array($this->tpl_customer_id, 40); if ($objQuery->exists("cp_dtb_customer_transaction", $where, $arrWhereVal)) { // OK } else { switch (basename(dirname($_SERVER["SCRIPT_NAME"]))) { case "au": break; default: if ($objCustomer->isLoginSuccess()) { $objCustomer->EndSession(); SC_Response_Ex::reload(); } break; } } } $objCategory = new SC_Helper_Category_Ex(); $this->arrCommonCategory = $objCategory->getList(true); $this->arrCommonCategoryTree = $objCategory->getTree(); $detect = new Mobile_Detect(); $script_file = $_SERVER["SCRIPT_NAME"]; $script_file = ltrim($script_file, "/"); $script_file2 = str_replace("ios/", "", $script_file); if ($detect->is("iOS")) { if (file_exists(HTML_REALDIR . "ios/{$script_file}")) { SC_Response_Ex::sendRedirect(HTTP_URL . "ios/{$script_file}", $_GET); } } elseif (strcmp($script_file, $script_file2) !== 0) { SC_Response_Ex::sendRedirect(HTTP_URL . "{$script_file2}", $_GET); } $_SESSION["is_android"] = $detect->is("AndroidOS"); if ($detect->isMobile() == false) { // NG $this->device_support = false; } elseif ($detect->is("iOS")) { if ($detect->match("iPhone")) { // OK $this->device_support = true; } elseif ($detect->match("iPod")) { // NG $this->device_support = false; } elseif ($detect->match("iPad")) { // NG $this->device_support = false; } else { // NG $this->device_support = false; } $version = $detect->version("iOS", $detect::VERSION_TYPE_FLOAT); if ($version < 6) { // NG $this->device_support = false; } } elseif ($detect->match("Android") == false) { // NG $this->device_support = false; } elseif (class_exists("SC_DeviceAndroidSelect_Ex", true)) { $useragent = array(); if (preg_match("|.*; ([^;]+) Build/.*|", $_SERVER["HTTP_USER_AGENT"], $useragent)) { $device = new SC_DeviceAndroidSelect_Ex(array("search_device_user_agent_word" => $useragent[1], "search_status" => 1)); $this->device_support = $device->exists(); $this->tpl_device = $device->getOne(); } } elseif ($detect->match("Android")) { // OK $this->device_support = true; } else { // NG $this->device_support = false; } } if ($this->device_support) { GC_Utils_Ex::gfPrintLog("対応端末:" . $_SERVER['HTTP_USER_AGENT']); return; } else { GC_Utils_Ex::gfPrintLog("非対応端末:" . $_SERVER['HTTP_USER_AGENT']); if (is_a($this, "LC_Page_Index")) { SC_Response_Ex::sendRedirect(HTTP_URL . "unsupported/index.php"); } elseif (is_a($this, "LC_Page_Unsupported")) { // 非対応端末表示を行わない return; } elseif (is_a($this, "LC_Page_Entry_Kiyaku")) { // 非対応端末表示を行わない return; } elseif ($this->not_unsupported) { // 非対応端末表示を行わない return; } else { SC_Response_Ex::sendRedirect(HTTP_URL . "unsupported/index.php"); } } }