source: branches/rel/html/shopping/loan.php @ 12157

Revision 12157, 2.6 KB checked in by uehara, 16 years ago (diff)
Line 
1<?php
2/*
3 * Copyright(c) 2000-2007 LOCKON CO.,LTD. All Rights Reserved.
4 *
5 * http://www.lockon.co.jp/
6 */
7
8require_once("../require.php");
9
10class LC_Page {
11    function LC_Page() {
12        $this->tpl_mainpage = 'shopping/loan.tpl';
13        $this->tpl_css = URL_DIR.'css/layout/shopping/pay.css';
14        // ¥Û¡¼¥à¥¢¥É¥ì¥¹
15        $this->tpl_homeaddr = CF_HOMEADDR;
16        // ¥·¥å¥ß¥ì¡¼¥·¥ç¥ó¸Æ¤Ó½Ð¤·
17        $this->tpl_simulate = CF_SIMULATE;
18        // ²ÃÌÁŹ¥³¡¼¥É
19        $this->tpl_storecode = CF_STORECODE;
20        // Ìá¤êÀè
21        $this->tpl_returnurl = CF_RETURNURL;
22        // ¸Æ¤Ó½Ð¤·¶èʬ(0:¥·¥å¥ß¥ì¡¼¥·¥ç¥ó¤Î¤ß¡¢1:¥·¥å¥ß¥ì¡¼¥·¥ç¥ó+¿½¹þ)
23        $this->tpl_continue = CF_CONTINUE;
24        // Ìò̵̳ͭ¶èʬ(0:̵¡¢1:Í­)
25        $this->tpl_labor = CF_LABOR;
26        // ·ë²Ì±þÅú(1:·ë²Ì¤¢¤ê¡¢2:·ë²Ì¤Ê¤·)
27        $this->tpl_result = CF_RESULT;
28        // ¥­¥ã¥ó¥»¥ëURL
29        $this->tpl_cancelurl = CF_CANCELURL;
30        /*
31         session_start»þ¤Îno-cache¥Ø¥Ã¥À¡¼¤òÍÞÀ©¤¹¤ë¤³¤È¤Ç
32         ¡ÖÌá¤ë¡×¥Ü¥¿¥ó»ÈÍÑ»þ¤ÎÍ­¸ú´ü¸ÂÀÚ¤ìɽ¼¨¤òÍÞÀ©¤¹¤ë¡£
33         private-no-expire:¥¯¥é¥¤¥¢¥ó¥È¤Î¥­¥ã¥Ã¥·¥å¤òµö²Ä¤¹¤ë¡£
34        */
35        session_cache_limiter('private-no-expire');     
36    }
37}
38
39$objPage = new LC_Page();
40$objView = new SC_SiteView();
41$objSiteSess = new SC_SiteSession();
42$objCartSess = new SC_CartSession();
43$objCampaignSess = new SC_CampaignSession();
44$objCustomer = new SC_Customer();
45$objSiteInfo = $objView->objSiteInfo;
46$arrInfo = $objSiteInfo->data;
47
48// Ãíʸ°ì»þID¤Î¼èÆÀ
49$uniqid = $objSiteSess->getUniqId();
50
51// ¥í¡¼¥ó·èºÑ¤ÎÌá¤êÃͤò¥Á¥§¥Ã¥¯¤¹¤ë¡£
52if($_GET['tranno'] == $uniqid) {
53    // ¥í¡¼¥ó·èºÑ¼õÉÕÈÖ¹æ¤òDB¤Ë½ñ¤­¹þ¤à
54    $sqlval['loan_result'] = $_GET['receiptno'];
55    $objQuery = new SC_Query();
56    $objQuery->update("dtb_order_temp", $sqlval, "order_temp_id = ?", array($uniqid));
57    // Àµ¾ï¤ËÅÐÏ¿¤µ¤ì¤¿¤³¤È¤òµ­Ï¿¤·¤Æ¤ª¤¯
58    $objSiteSess->setRegistFlag();
59    // ½èÍý´°Î»¥Ú¡¼¥¸¤Ø
60    header("Location: " . URL_SHOP_COMPLETE);
61}
62
63switch($_POST['mode']) {
64// Á°¤Î¥Ú¡¼¥¸¤ËÌá¤ë
65case 'return':
66    // Àµ¾ï¤Ê¿ä°Ü¤Ç¤¢¤ë¤³¤È¤òµ­Ï¿¤·¤Æ¤ª¤¯
67    $objSiteSess->setRegistFlag();
68    header("Location: " . URL_SHOP_CONFIRM);
69    exit;
70    break;
71default:
72    break;
73}
74
75// ¥«¡¼¥È½¸·×½èÍý
76$objPage = sfTotalCart($objPage, $objCartSess, $arrInfo);
77// °ì»þ¼õÃí¥Æ¡¼¥Ö¥ë¤ÎÆɹþ
78$arrData = sfGetOrderTemp($uniqid);
79// ¥«¡¼¥È½¸·×¤ò¸µ¤ËºÇ½ª·×»»
80$arrData = sfTotalConfirm($arrData, $objPage, $objCartSess, $arrInfo);
81
82// »Ùʧ¤¤Áí³Û
83$objPage->tpl_amount = $arrData['payment_total'];
84// ¼õÃí²¾ÈÖ¹æ
85$objPage->tpl_tranno = $uniqid;
86// ´ðËܾðÊó¤òÅϤ¹
87$objPage->arrInfo = $arrInfo;
88
89$objView->assignobj($objPage);
90// ¥Õ¥ì¡¼¥à¤òÁªÂò(¥­¥ã¥ó¥Ú¡¼¥ó¥Ú¡¼¥¸¤«¤éÁ«°Ü¤Ê¤éÊѹ¹)
91$objCampaignSess->pageView($objView);
92//--------------------------------------------------------------------------------------------------------------------------
93?>
Note: See TracBrowser for help on using the repository browser.