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