本文整理汇总了PHP中SC_Customer_Ex::EndSession方法的典型用法代码示例。如果您正苦于以下问题:PHP SC_Customer_Ex::EndSession方法的具体用法?PHP SC_Customer_Ex::EndSession怎么用?PHP SC_Customer_Ex::EndSession使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SC_Customer_Ex
的用法示例。
在下文中一共展示了SC_Customer_Ex::EndSession方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: action
/**
* Page のAction.
*
* @return void
*/
public function action()
{
switch ($this->getMode()) {
case 'confirm':
// トークンを設定
$this->refusal_transactionid = $this->getRefusalToken();
$this->tpl_mainpage = 'mypage/refusal_confirm.tpl';
$this->tpl_subtitle = '退会手続き(確認ページ)';
break;
case 'complete':
// トークン入力チェック
if (!$this->isValidRefusalToken()) {
// エラー画面へ遷移する
SC_Utils_Ex::sfDispSiteError(PAGE_ERROR, '', true);
SC_Response_Ex::actionExit();
}
$objCustomer = new SC_Customer_Ex();
$this->lfDeleteCustomer($objCustomer->getValue('customer_id'));
$objCustomer->EndSession();
SC_Response_Ex::sendRedirect('refusal_complete.php');
break;
default:
if (SC_Display_Ex::detectDevice() == DEVICE_TYPE_MOBILE) {
$this->refusal_transactionid = $this->getRefusalToken();
}
break;
}
}
示例2: action
/**
* アクション.
*/
function action()
{
if (!extension_loaded("dom")) {
SC_Utils_Ex::sfDispSiteError(FREE_ERROR_MSG, "", true, "サービス停止中です。(E0001)");
}
$objCustomer = new SC_Customer_Ex();
switch ($this->getMode()) {
case "logout":
$objCustomer->EndSession();
SC_Response_Ex::sendRedirect(HTTP_URL);
SC_Response_Ex::actionExit();
break;
case "pay_cert_for_authory_sold":
$ammount = $this->getAmmount();
$this->doPayCertForAuthorySold($this->config, $objCustomer, $ammount);
break;
case "pay_cert_for_authory_sold_ok":
$this->doAuthorySold($this->config, $objCustomer);
break;
case "pay_cert_for_authory_sold_ng":
SC_Utils_Ex::sfDispSiteError(FREE_ERROR_MSG, "", true, "ポイント購入をキャンセルいたしました。");
break;
case "cont_bill_cancel":
$this->doContBillCancel($this->config, $objCustomer);
break;
case "pay_cert_for_cont_bill":
if ($this->device_support) {
$this->doPayCertForContBill($this->config, $objCustomer);
} else {
SC_Utils_Ex::sfDispSiteError(FREE_ERROR_MSG, "", true, "非対応端末につき会員登録は中止しました");
}
break;
case "pay_cert_for_cont_bill_ng":
SC_Utils_Ex::sfDispSiteError(FREE_ERROR_MSG, "", true, "会員登録をキャンセルいたしました。");
break;
case "pay_cert_for_cont_bill_ok":
$this->doAuthorySold($this->config, $objCustomer, false);
break;
case "auth_auone":
$this->doAuthAuone();
break;
default:
case "login_auone":
$this->doLoginAuone();
break;
case "cont_bill_result":
$this->doContBillResult($this->getAccountDay());
break;
}
}
示例3: action
/**
* Page のAction.
*
* @return void
*/
function action()
{
switch ($this->getMode()) {
case 'confirm':
$this->tpl_mainpage = 'mypage/refusal_confirm.tpl';
$this->tpl_subtitle = '退会手続き(確認ページ)';
break;
case 'complete':
$objCustomer = new SC_Customer_Ex();
$this->lfDeleteCustomer($objCustomer->getValue('customer_id'));
$objCustomer->EndSession();
SC_Response_Ex::sendRedirect('refusal_complete.php');
}
}
示例4: action
//.........这里部分代码省略.........
$objFormParam->toLower('login_email');
$arrErr = $objFormParam->checkError();
// エラーの場合はエラー画面に遷移
if (count($arrErr) > 0) {
if (SC_Display_Ex::detectDevice() === DEVICE_TYPE_SMARTPHONE) {
echo $this->lfGetErrorMessage(TEMP_LOGIN_ERROR);
SC_Response_Ex::actionExit();
} else {
SC_Utils_Ex::sfDispSiteError(TEMP_LOGIN_ERROR);
SC_Response_Ex::actionExit();
}
}
// 入力チェック後の値を取得
$arrForm = $objFormParam->getHashArray();
// クッキー保存判定
if ($arrForm['login_memory'] == '1' && $arrForm['login_email'] != '') {
$objCookie->setCookie('login_email', $arrForm['login_email']);
} else {
$objCookie->setCookie('login_email', '');
}
// 遷移先の制御
if (count($arrErr) == 0) {
// ログイン処理
if ($objCustomer->doLogin($arrForm['login_email'], $arrForm['login_pass'])) {
if (SC_Display_Ex::detectDevice() === DEVICE_TYPE_MOBILE) {
// ログインが成功した場合は携帯端末IDを保存する。
$objCustomer->updateMobilePhoneId();
/*
* email がモバイルドメインでは無く,
* 携帯メールアドレスが登録されていない場合
*/
$objMobile = new SC_Helper_Mobile_Ex();
if (!$objMobile->gfIsMobileMailAddress($objCustomer->getValue('email'))) {
if (!$objCustomer->hasValue('email_mobile')) {
SC_Response_Ex::sendRedirectFromUrlPath('entry/email_mobile.php');
SC_Response_Ex::actionExit();
}
}
}
// --- ログインに成功した場合
if (SC_Display_Ex::detectDevice() === DEVICE_TYPE_SMARTPHONE) {
echo SC_Utils_Ex::jsonEncode(array('success' => $url));
} else {
SC_Response_Ex::sendRedirect($url);
}
SC_Response_Ex::actionExit();
} else {
// --- ログインに失敗した場合
// ブルートフォースアタック対策
// ログイン失敗時に遅延させる
sleep(LOGIN_RETRY_INTERVAL);
$arrForm['login_email'] = strtolower($arrForm['login_email']);
$objQuery = SC_Query_Ex::getSingletonInstance();
$where = '(email = ? OR email_mobile = ?) AND status = 1 AND del_flg = 0';
$exists = $objQuery->exists('dtb_customer', $where, array($arrForm['login_email'], $arrForm['login_email']));
// ログインエラー表示 TODO リファクタリング
if ($exists) {
if (SC_Display_Ex::detectDevice() === DEVICE_TYPE_SMARTPHONE) {
echo $this->lfGetErrorMessage(TEMP_LOGIN_ERROR);
SC_Response_Ex::actionExit();
} else {
SC_Utils_Ex::sfDispSiteError(TEMP_LOGIN_ERROR);
SC_Response_Ex::actionExit();
}
} else {
if (SC_Display_Ex::detectDevice() === DEVICE_TYPE_SMARTPHONE) {
echo $this->lfGetErrorMessage(SITE_LOGIN_ERROR);
SC_Response_Ex::actionExit();
} else {
SC_Utils_Ex::sfDispSiteError(SITE_LOGIN_ERROR);
SC_Response_Ex::actionExit();
}
}
}
} else {
// XXX 到達しない?
// 入力エラーの場合、元のアドレスに戻す。
SC_Response_Ex::sendRedirect($url);
SC_Response_Ex::actionExit();
}
break;
case 'logout':
// --- ログアウト
// ログイン情報の解放
$objCustomer->EndSession();
// 画面遷移の制御
$mypage_url_search = strpos('.' . $url, 'mypage');
if ($mypage_url_search == 2) {
// マイページログイン中はログイン画面へ移行
SC_Response_Ex::sendRedirectFromUrlPath('mypage/login.php');
} else {
// 上記以外の場合、トップへ遷移
SC_Response_Ex::sendRedirect(HTTP_URL);
}
SC_Response_Ex::actionExit();
break;
default:
break;
}
}
示例5: init
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");
//.........这里部分代码省略.........