[11409] | 1 | <?php |
---|
| 2 | /* |
---|
| 3 | * Copyright(c) 2000-2006 LOCKON CO.,LTD. All Rights Reserved. |
---|
| 4 | * |
---|
| 5 | * http://www.lockon.co.jp/ |
---|
| 6 | */ |
---|
| 7 | |
---|
| 8 | require_once("../require.php"); |
---|
| 9 | |
---|
| 10 | class LC_Page { |
---|
| 11 | var $arrSession; |
---|
| 12 | var $tpl_mode; |
---|
| 13 | var $tpl_total_deliv_fee; |
---|
| 14 | function LC_Page() { |
---|
| 15 | $this->tpl_mainpage = 'shopping/confirm.tpl'; |
---|
| 16 | $this->tpl_css = '/css/layout/shopping/confirm.css'; |
---|
| 17 | $this->tpl_title = "¤´ÆþÎÏÆâÍƤΤ´³Îǧ"; |
---|
| 18 | global $arrPref; |
---|
| 19 | $this->arrPref = $arrPref; |
---|
| 20 | global $arrSex; |
---|
| 21 | $this->arrSex = $arrSex; |
---|
| 22 | global $arrMAILMAGATYPE; |
---|
| 23 | $this->arrMAILMAGATYPE = $arrMAILMAGATYPE; |
---|
| 24 | global $arrReminder; |
---|
| 25 | $this->arrReminder = $arrReminder; |
---|
| 26 | /* |
---|
| 27 | session_start»þ¤Îno-cache¥Ø¥Ã¥À¡¼¤òÍÞÀ©¤¹¤ë¤³¤È¤Ç |
---|
| 28 | ¡ÖÌá¤ë¡×¥Ü¥¿¥ó»ÈÍÑ»þ¤Î͸ú´ü¸ÂÀÚ¤ìɽ¼¨¤òÍÞÀ©¤¹¤ë¡£ |
---|
| 29 | private-no-expire:¥¯¥é¥¤¥¢¥ó¥È¤Î¥¥ã¥Ã¥·¥å¤òµö²Ä¤¹¤ë¡£ |
---|
| 30 | */ |
---|
| 31 | session_cache_limiter('private-no-expire'); |
---|
| 32 | |
---|
| 33 | } |
---|
| 34 | } |
---|
| 35 | |
---|
| 36 | $objPage = new LC_Page(); |
---|
| 37 | $objView = new SC_SiteView(); |
---|
| 38 | $objCartSess = new SC_CartSession(); |
---|
| 39 | $objSiteInfo = $objView->objSiteInfo; |
---|
| 40 | $objSiteSess = new SC_SiteSession(); |
---|
| 41 | $objCustomer = new SC_Customer(); |
---|
| 42 | $arrInfo = $objSiteInfo->data; |
---|
| 43 | $objQuery = new SC_Query(); |
---|
| 44 | |
---|
| 45 | // Á°¤Î¥Ú¡¼¥¸¤ÇÀµ¤·¤¯ÅÐÏ¿¼ê³¤¤¬¹Ô¤ï¤ì¤¿µÏ¿¤¬¤¢¤ë¤«È½Äê |
---|
| 46 | sfIsPrePage($objSiteSess); |
---|
| 47 | |
---|
| 48 | // ¥æ¡¼¥¶¥æ¥Ë¡¼¥¯ID¤Î¼èÆÀ¤È¹ØÆþ¾õÂÖ¤ÎÀµÅöÀ¤ò¥Á¥§¥Ã¥¯ |
---|
| 49 | $uniqid = sfCheckNormalAccess($objSiteSess, $objCartSess); |
---|
| 50 | $objPage->tpl_uniqid = $uniqid; |
---|
| 51 | |
---|
| 52 | // ¥«¡¼¥È½¸·×½èÍý |
---|
| 53 | $objPage = sfTotalCart($objPage, $objCartSess, $arrInfo); |
---|
| 54 | // °ì»þ¼õÃí¥Æ¡¼¥Ö¥ë¤ÎÆɹþ |
---|
| 55 | $arrData = sfGetOrderTemp($uniqid); |
---|
| 56 | // ¥«¡¼¥È½¸·×¤ò¸µ¤ËºÇ½ª·×»» |
---|
| 57 | $arrData = sfTotalConfirm($arrData, $objPage, $objCartSess, $arrInfo, $objCustomer); |
---|
| 58 | |
---|
| 59 | // ¥«¡¼ÅÔÆâ¤Î¾¦ÉʤÎÇä¤êÀÚ¤ì¥Á¥§¥Ã¥¯ |
---|
| 60 | $objCartSess->chkSoldOut($objCartSess->getCartList()); |
---|
| 61 | |
---|
| 62 | // ²ñ°÷¥í¥°¥¤¥ó¥Á¥§¥Ã¥¯ |
---|
| 63 | if($objCustomer->isLoginSuccess()) { |
---|
| 64 | $objPage->tpl_login = '1'; |
---|
| 65 | $objPage->tpl_user_point = $objCustomer->getValue('point'); |
---|
| 66 | } |
---|
| 67 | |
---|
| 68 | // ·èºÑ¶èʬ¤ò¼èÆÀ¤¹¤ë |
---|
| 69 | $payment_type = ""; |
---|
| 70 | if(sfColumnExists("dtb_payment", "memo01")){ |
---|
| 71 | // MEMO03¤ËÃͤ¬Æþ¤Ã¤Æ¤¤¤ë¾ì¹ç¤Ë¤Ï¡¢¥â¥¸¥å¡¼¥ëÄɲ䵤줿¤â¤Î¤È¤ß¤Ê¤¹ |
---|
| 72 | $sql = "SELECT memo03 FROM dtb_payment WHERE payment_id = ?"; |
---|
| 73 | $arrPayment = $objQuery->getall($sql, array($arrData['payment_id'])); |
---|
| 74 | $payment_type = $arrPayment[0]["memo03"]; |
---|
| 75 | } |
---|
| 76 | $objPage->payment_type = $payment_type; |
---|
| 77 | |
---|
| 78 | |
---|
| 79 | switch($_POST['mode']) { |
---|
| 80 | // Á°¤Î¥Ú¡¼¥¸¤ËÌá¤ë |
---|
| 81 | case 'return': |
---|
| 82 | // Àµ¾ï¤Ê¿ä°Ü¤Ç¤¢¤ë¤³¤È¤òµÏ¿¤·¤Æ¤ª¤¯ |
---|
| 83 | $objSiteSess->setRegistFlag(); |
---|
| 84 | header("Location: " . gfAddSessionId(URL_SHOP_PAYMENT)); |
---|
| 85 | exit; |
---|
| 86 | break; |
---|
| 87 | case 'confirm': |
---|
| 88 | // ¤³¤Î»þÅÀ¤Ç¥ª¡¼¥À¡¼ID¤ò³ÎÊݤ·¤Æ¤ª¤¯¡Ê¥¯¥ì¥¸¥Ã¥È¡¢¥³¥ó¥Ó¥Ë·èºÑ¤ÇɬÍפʤ¿¤á¡Ë |
---|
| 89 | // postgresql¤Èmysql¤È¤Ç½èÍý¤òʬ¤±¤ë |
---|
| 90 | if (DB_TYPE == "pgsql") { |
---|
| 91 | $order_id = $objQuery->nextval("dtb_order","order_id"); |
---|
| 92 | }elseif (DB_TYPE == "mysql") { |
---|
| 93 | $order_id = $objQuery->get_auto_increment("dtb_order"); |
---|
| 94 | } |
---|
| 95 | $arrData["order_id"] = $order_id; |
---|
| 96 | |
---|
| 97 | // ½¸·×·ë²Ì¤ò¼õÃí°ì»þ¥Æ¡¼¥Ö¥ë¤ËÈ¿±Ç |
---|
| 98 | sfRegistTempOrder($uniqid, $arrData); |
---|
| 99 | // Àµ¾ï¤ËÅÐÏ¿¤µ¤ì¤¿¤³¤È¤òµÏ¿¤·¤Æ¤ª¤¯ |
---|
| 100 | $objSiteSess->setRegistFlag(); |
---|
| 101 | |
---|
| 102 | // ·èºÑÊýË¡¤Ë¤è¤ê²èÌÌÀÚÂØ |
---|
| 103 | if($payment_type != "") { |
---|
| 104 | $_SESSION["payment_id"] = $arrData['payment_id']; |
---|
| 105 | header("Location: " . gfAddSessionId(URL_SHOP_MODULE)); |
---|
| 106 | }else{ |
---|
| 107 | header("Location: " . gfAddSessionId(URL_SHOP_COMPLETE)); |
---|
| 108 | } |
---|
| 109 | break; |
---|
| 110 | default: |
---|
| 111 | break; |
---|
| 112 | } |
---|
| 113 | |
---|
| 114 | |
---|
| 115 | $objPage->arrData = $arrData; |
---|
| 116 | $objPage->arrInfo = $arrInfo; |
---|
| 117 | $objView->assignobj($objPage); |
---|
| 118 | $objView->display(SITE_FRAME); |
---|
| 119 | //-------------------------------------------------------------------------------------------------------------------------- |
---|
| 120 | ?> |
---|