source: branches/comu/html/frontparts/bloc/login.php @ 12197

Revision 12197, 1.5 KB checked in by adati, 17 years ago (diff)

1.3.0正式版のマージ

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.