source: branches/feature-module-update/html/frontparts/bloc/login.php @ 15079

Revision 15079, 1.6 KB checked in by nanasess, 13 years ago (diff)

svn:mime-type application/x-httpd-php; charset=UTF-8 設定

  • Property svn:mime-type set to application/x-httpd-php; charset=UTF-8
Line 
1<?php
2/*
3 * Copyright(c) 2000-2007 LOCKON CO.,LTD. All Rights Reserved.
4 *
5 * http://www.lockon.co.jp/
6 */
7class LC_LoginPage {
8    var $tpl_login_email;
9    function LC_LoginPage() {
10        /** 必ず変更する **/
11        $this->tpl_mainpage = BLOC_PATH . 'login.tpl';  // メイン
12        $this->tpl_login = false;
13        $this->tpl_disable_logout = false;
14    }
15}
16
17$objSubPage = new LC_LoginPage();
18$objCustomer = new SC_Customer();
19// クッキー管理クラス
20$objCookie = new SC_Cookie(COOKIE_EXPIRE);
21
22// ログイン判定
23if($objCustomer->isLoginSuccess()) {
24    $objSubPage->tpl_login = true;
25    $objSubPage->tpl_user_point = $objCustomer->getValue('point');
26    $objSubPage->tpl_name1 = $objCustomer->getValue('name01');
27    $objSubPage->tpl_name2 = $objCustomer->getValue('name02');
28} else {
29    // クッキー判定
30    $objSubPage->tpl_login_email = $objCookie->getCookie('login_email');
31    if($objSubPage->tpl_login_email != "") {
32        $objSubPage->tpl_login_memory = "1";
33    }
34   
35    // POSTされてきたIDがある場合は優先する。
36    if($_POST['login_email'] != "") {
37        $objSubPage->tpl_login_email = $_POST['login_email'];
38    }
39}
40
41$objSubPage->tpl_disable_logout = lfCheckDisableLogout();
42$objSubView = new SC_SiteView();
43$objSubView->assignobj($objSubPage);
44$objSubView->display($objSubPage->tpl_mainpage);
45//-----------------------------------------------------------------------------------------------------------------------------------
46function lfCheckDisableLogout() {
47    global $arrDISABLE_LOGOUT;
48   
49    $nowpage = $_SERVER['PHP_SELF'];
50   
51    foreach($arrDISABLE_LOGOUT as $val) {
52        if($nowpage == $val) {
53            return true;
54        }
55    }
56    return false;
57}
58?>
Note: See TracBrowser for help on using the repository browser.