| 1 | <?php |
|---|
| 2 | /* |
|---|
| 3 | * Copyright(c) 2000-2006 LOCKON CO.,LTD. All Rights Reserved. |
|---|
| 4 | * |
|---|
| 5 | * http://www.lockon.co.jp/ |
|---|
| 6 | */ |
|---|
| 7 | require_once("../require.php"); |
|---|
| 8 | |
|---|
| 9 | class 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 | |
|---|
| 25 | //¥í¥°¥¤¥óȽÄê |
|---|
| 26 | if (!$objCustomer->isLoginSuccess()){ |
|---|
| 27 | sfDispSiteError(CUSTOMER_ERROR); |
|---|
| 28 | }else { |
|---|
| 29 | //¥Þ¥¤¥Ú¡¼¥¸¥È¥Ã¥×¸ÜµÒ¾ðÊóɽ¼¨ÍÑ |
|---|
| 30 | $objPage->CustomerName1 = $objCustomer->getvalue('name01'); |
|---|
| 31 | $objPage->CustomerName2 = $objCustomer->getvalue('name02'); |
|---|
| 32 | $objPage->CustomerPoint = $objCustomer->getvalue('point'); |
|---|
| 33 | } |
|---|
| 34 | |
|---|
| 35 | |
|---|
| 36 | // ¥ì¥¤¥¢¥¦¥È¥Ç¥¶¥¤¥ó¤ò¼èÆÀ |
|---|
| 37 | $objPage = sfGetPageLayout($objPage, false, "mypage/index.php"); |
|---|
| 38 | |
|---|
| 39 | switch ($_POST['mode']){ |
|---|
| 40 | case 'confirm': |
|---|
| 41 | $objPage->tpl_mainpage = USER_PATH . 'templates/mypage/refusal_confirm.tpl'; |
|---|
| 42 | $objPage->tpl_title = "MY¥Ú¡¼¥¸/Âà²ñ¼ê³¤(³Îǧ¥Ú¡¼¥¸)"; |
|---|
| 43 | |
|---|
| 44 | break; |
|---|
| 45 | |
|---|
| 46 | case 'complete': |
|---|
| 47 | //²ñ°÷ºï½ü |
|---|
| 48 | $objQuery->exec("UPDATE dtb_customer SET del_flg=1, update_date=now() WHERE customer_id=?", array($objCustomer->getValue('customer_id'))); |
|---|
| 49 | |
|---|
| 50 | $where = "email ILIKE ?"; |
|---|
| 51 | if (DB_TYPE == "mysql") $where = sfChangeILIKE($where); |
|---|
| 52 | |
|---|
| 53 | $objQuery->delete("dtb_customer_mail", $where, array($objCustomer->getValue('email'))); |
|---|
| 54 | $objCustomer->EndSession(); |
|---|
| 55 | //´°Î»¥Ú¡¼¥¸¤Ø |
|---|
| 56 | header("Location: ./refusal_complete.php"); |
|---|
| 57 | exit; |
|---|
| 58 | } |
|---|
| 59 | |
|---|
| 60 | $objView->assignobj($objPage); |
|---|
| 61 | $objView->display(SITE_FRAME); |
|---|
| 62 | |
|---|
| 63 | ?> |
|---|