source: branches/beta/html/mypage/refusal.php @ 15056

Revision 15056, 2.2 KB checked in by adati, 17 years ago (diff)

relブランチのマージ(r12156-r15055)

Line 
1<?php
2/*
3 * Copyright(c) 2000-2007 LOCKON CO.,LTD. All Rights Reserved.
4 *
5 * http://www.lockon.co.jp/
6 */
7require_once("../require.php");
8
9class LC_Page{
10    function LC_Page(){
11        $this->tpl_mainpage = USER_PATH . 'templates/mypage/refusal.tpl';
12        $this->tpl_title = "MY¥Ú¡¼¥¸/Âà²ñ¼ê³¤­(ÆþÎÏ¥Ú¡¼¥¸)";
13        $this->tpl_navi = USER_PATH . 'templates/mypage/navi.tpl';
14        $this->tpl_mainno = 'mypage';
15        $this->tpl_mypageno = 'refusal';
16        //session_cache_limiter('private-no-expire');
17    }
18}
19
20$objPage = new LC_Page();
21$objView = new SC_SiteView();
22$objCustomer = new SC_Customer();
23$objQuery = new SC_Query();
24$objSiteSess = new SC_SiteSession();
25
26//¥í¥°¥¤¥óȽÄê
27if (!$objCustomer->isLoginSuccess()){
28    sfDispSiteError(CUSTOMER_ERROR);
29}else {
30    //¥Þ¥¤¥Ú¡¼¥¸¥È¥Ã¥×¸ÜµÒ¾ðÊóɽ¼¨ÍÑ
31    $objPage->CustomerName1 = $objCustomer->getvalue('name01');
32    $objPage->CustomerName2 = $objCustomer->getvalue('name02');
33    $objPage->CustomerPoint = $objCustomer->getvalue('point');
34}
35
36
37// ¥ì¥¤¥¢¥¦¥È¥Ç¥¶¥¤¥ó¤ò¼èÆÀ
38$objPage = sfGetPageLayout($objPage, false, "mypage/index.php");
39
40switch ($_POST['mode']){
41    case 'confirm':
42   
43    $objPage->tpl_mainpage = USER_PATH . 'templates/mypage/refusal_confirm.tpl';
44    $objPage->tpl_title = "MY¥Ú¡¼¥¸/Âà²ñ¼ê³¤­(³Îǧ¥Ú¡¼¥¸)";
45   
46    // ³Îǧ¥Ú¡¼¥¸¤ò·Ðͳ¤·¤¿¤³¤È¤òÅÐÏ¿
47    $objSiteSess->setRegistFlag();
48    // hidden¤Ëuniqid¤òËä¤á¹þ¤à
49    $objPage->tpl_uniqid = $objSiteSess->getUniqId();
50   
51    break;
52   
53    case 'complete':
54    // Àµ¤·¤¤Á«°Ü¤«¤É¤¦¤«¤ò¥Á¥§¥Ã¥¯
55    lfIsValidMovement($objSiteSess);
56   
57    //²ñ°÷ºï½ü
58    $objQuery->exec("UPDATE dtb_customer SET del_flg=1, update_date=now() WHERE customer_id=?", array($objCustomer->getValue('customer_id')));
59
60    $objCustomer->EndSession();
61    //´°Î»¥Ú¡¼¥¸¤Ø
62    header("Location: ./refusal_complete.php");
63    exit;
64}
65
66$objView->assignobj($objPage);
67$objView->display(SITE_FRAME);
68
69// Àµ¤·¤¤Á«°Ü¤«¤É¤¦¤«¤ò¥Á¥§¥Ã¥¯
70function lfIsValidMovement($objSiteSess) {
71    // ³Îǧ¥Ú¡¼¥¸¤«¤é¤ÎÁ«°Ü¤«¤É¤¦¤«¤ò¥Á¥§¥Ã¥¯
72    sfIsPrePage($objSiteSess);
73   
74    // uniqid ¤¬POST¤µ¤ì¤Æ¤¤¤ë¤«¤ò¥Á¥§¥Ã¥¯
75    $uniqid = $objSiteSess->getUniqId();
76    if ( !empty($_POST['uniqid']) && ($_POST['uniqid'] === $uniqid) ) {
77        return;
78    } else {
79        sfDispSiteError(PAGE_ERROR, $objSiteSess);
80    }
81}
82?>
Note: See TracBrowser for help on using the repository browser.