1 | <?php |
---|
2 | /* |
---|
3 | * Copyright(c) 2000-2007 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 = URL_DIR.'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 | $objCampaignSess = new SC_CampaignSession(); |
---|
42 | $objCustomer = new SC_Customer(); |
---|
43 | $arrInfo = $objSiteInfo->data; |
---|
44 | $objQuery = new SC_Query(); |
---|
45 | |
---|
46 | // Á°¤Î¥Ú¡¼¥¸¤ÇÀµ¤·¤¯ÅÐÏ¿¼ê³¤¤¬¹Ô¤ï¤ì¤¿µÏ¿¤¬¤¢¤ë¤«È½Äê |
---|
47 | sfIsPrePage($objSiteSess); |
---|
48 | |
---|
49 | // ¥æ¡¼¥¶¥æ¥Ë¡¼¥¯ID¤Î¼èÆÀ¤È¹ØÆþ¾õÂÖ¤ÎÀµÅöÀ¤ò¥Á¥§¥Ã¥¯ |
---|
50 | $uniqid = sfCheckNormalAccess($objSiteSess, $objCartSess); |
---|
51 | $objPage->tpl_uniqid = $uniqid; |
---|
52 | |
---|
53 | // ¥«¡¼¥È½¸·×½èÍý |
---|
54 | $objPage = sfTotalCart($objPage, $objCartSess, $arrInfo); |
---|
55 | // °ì»þ¼õÃí¥Æ¡¼¥Ö¥ë¤ÎÆÉ¹þ |
---|
56 | $arrData = sfGetOrderTemp($uniqid); |
---|
57 | // ¥«¡¼¥È½¸·×¤ò¸µ¤ËºÇ½ª·×»» |
---|
58 | $arrData = sfTotalConfirm($arrData, $objPage, $objCartSess, $arrInfo, $objCustomer, $objCampaignSess); |
---|
59 | // ¥¥ã¥ó¥Ú¡¼¥ó¤«¤é¤ÎÁ«°Ü¤ÇÁ÷ÎÁ¤¬ÌµÎÁ¤À¤Ã¤¿¾ì¹ç¤Î½èÍý |
---|
60 | if($objCampaignSess->getIsCampaign()) { |
---|
61 | $deliv_free_flg = $objQuery->get("dtb_campaign", "deliv_free_flg", "campaign_id = ?", array($objCampaignSess->getCampaignId())); |
---|
62 | // Á÷ÎÁ̵ÎÁ¤¬ÀßÄꤵ¤ì¤Æ¤¤¤¿¾ì¹ç |
---|
63 | if($deliv_free_flg) { |
---|
64 | $arrData['payment_total'] -= $arrData['deliv_fee']; |
---|
65 | $arrData['deliv_fee'] = 0; |
---|
66 | } |
---|
67 | } |
---|
68 | |
---|
69 | |
---|
70 | // ¥«¡¼¥ÈÆâ¤Î¾¦ÉʤÎÇä¤êÀÚ¤ì¥Á¥§¥Ã¥¯ |
---|
71 | $objCartSess->chkSoldOut($objCartSess->getCartList()); |
---|
72 | |
---|
73 | // ²ñ°÷¥í¥°¥¤¥ó¥Á¥§¥Ã¥¯ |
---|
74 | if($objCustomer->isLoginSuccess()) { |
---|
75 | $objPage->tpl_login = '1'; |
---|
76 | $objPage->tpl_user_point = $objCustomer->getValue('point'); |
---|
77 | } |
---|
78 | |
---|
79 | // ·èºÑ¶èʬ¤ò¼èÆÀ¤¹¤ë |
---|
80 | $payment_type = ""; |
---|
81 | if(sfColumnExists("dtb_payment", "memo01")){ |
---|
82 | // MEMO03¤ËÃͤ¬Æþ¤Ã¤Æ¤¤¤ë¾ì¹ç¤Ë¤Ï¡¢¥â¥¸¥å¡¼¥ëÄɲ䵤줿¤â¤Î¤È¤ß¤Ê¤¹ |
---|
83 | $sql = "SELECT memo03 FROM dtb_payment WHERE payment_id = ?"; |
---|
84 | $arrPayment = $objQuery->getall($sql, array($arrData['payment_id'])); |
---|
85 | $payment_type = $arrPayment[0]["memo03"]; |
---|
86 | } |
---|
87 | $objPage->payment_type = $payment_type; |
---|
88 | |
---|
89 | |
---|
90 | switch($_POST['mode']) { |
---|
91 | // Á°¤Î¥Ú¡¼¥¸¤ËÌá¤ë |
---|
92 | case 'return': |
---|
93 | // Àµ¾ï¤Ê¿ä°Ü¤Ç¤¢¤ë¤³¤È¤òµÏ¿¤·¤Æ¤ª¤¯ |
---|
94 | $objSiteSess->setRegistFlag(); |
---|
95 | header("Location: " . URL_SHOP_PAYMENT); |
---|
96 | exit; |
---|
97 | break; |
---|
98 | case 'confirm': |
---|
99 | // ¤³¤Î»þÅÀ¤Ç¥ª¡¼¥À¡¼ID¤ò³ÎÊݤ·¤Æ¤ª¤¯¡Ê¥¯¥ì¥¸¥Ã¥È¡¢¥³¥ó¥Ó¥Ë·èºÑ¤ÇɬÍפʤ¿¤á¡Ë |
---|
100 | // postgresql¤Èmysql¤È¤Ç½èÍý¤òʬ¤±¤ë |
---|
101 | if (DB_TYPE == "pgsql") { |
---|
102 | $order_id = $objQuery->nextval("dtb_order","order_id"); |
---|
103 | }elseif (DB_TYPE == "mysql") { |
---|
104 | $order_id = $objQuery->get_auto_increment("dtb_order"); |
---|
105 | } |
---|
106 | $arrData["order_id"] = $order_id; |
---|
107 | |
---|
108 | // ½¸·×·ë²Ì¤ò¼õÃí°ì»þ¥Æ¡¼¥Ö¥ë¤ËÈ¿±Ç |
---|
109 | sfRegistTempOrder($uniqid, $arrData); |
---|
110 | // Àµ¾ï¤ËÅÐÏ¿¤µ¤ì¤¿¤³¤È¤òµÏ¿¤·¤Æ¤ª¤¯ |
---|
111 | $objSiteSess->setRegistFlag(); |
---|
112 | |
---|
113 | // ·èºÑÊýË¡¤Ë¤è¤ê²èÌÌÀÚÂØ |
---|
114 | if($payment_type != "") { |
---|
115 | $_SESSION["payment_id"] = $arrData['payment_id']; |
---|
116 | header("Location: " . URL_SHOP_MODULE); |
---|
117 | }else{ |
---|
118 | header("Location: " . URL_SHOP_COMPLETE); |
---|
119 | } |
---|
120 | break; |
---|
121 | default: |
---|
122 | break; |
---|
123 | } |
---|
124 | |
---|
125 | $objPage->arrData = $arrData; |
---|
126 | $objPage->arrInfo = $arrInfo; |
---|
127 | $objView->assignobj($objPage); |
---|
128 | // ¥Õ¥ì¡¼¥à¤òÁªÂò(¥¥ã¥ó¥Ú¡¼¥ó¥Ú¡¼¥¸¤«¤éÁ«°Ü¤Ê¤éÊѹ¹) |
---|
129 | $objCampaignSess->pageView($objView); |
---|
130 | //-------------------------------------------------------------------------------------------------------------------------- |
---|
131 | ?> |
---|