Changeset 16238 for branches/feature-module-update/html
- Timestamp:
- 2007/10/02 21:43:36 (16 years ago)
- Location:
- branches/feature-module-update/html/mobile/mypage
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/feature-module-update/html/mobile/mypage/history.php
r16170 r16238 7 7 * 8 8 * 9 * MyPage9 * モバイルサイト/購入履歴 10 10 */ 11 11 12 // {{{ requires 12 13 require_once("../require.php"); 14 require_once(CLASS_PATH . "page_extends/mypage/LC_Page_Mypage_History_Ex.php"); 13 15 14 class LC_Page{ 15 function LC_Page() { 16 $this->tpl_mainpage = MOBILE_TEMPLATE_DIR . 'mypage/history.tpl'; 17 $this->tpl_title = 'MYページ/購入履歴一覧'; 18 session_cache_limiter('private-no-expire'); 19 } 20 } 16 // }}} 17 // {{{ generate page 21 18 22 define ("HISTORY_NUM", 5); 23 24 $objPage = new LC_Page(); 25 $objView = new SC_MobileView(); 26 $objQuery = new SC_Query(); 27 $objCustomer = new SC_Customer(); 28 $pageNo = isset($_GET['pageno']) ? $_GET['pageno'] : 0; 29 30 // レイアウトデザインを取得 31 //$objLayout = new SC_Helper_PageLayout_Ex(); 32 //$objLayout->sfGetPageLayout($objPage, false, "mypage/index.php"); 33 34 // ログインチェック 35 if(!isset($_SESSION['customer'])) { 36 SC_Utils_Ex::sfDispSiteError(CUSTOMER_ERROR, "", false, "", true); 37 } 38 39 $col = "order_id, create_date, payment_id, payment_total"; 40 $from = "dtb_order"; 41 $where = "del_flg = 0 AND customer_id=?"; 42 $arrval = array($objCustomer->getvalue('customer_id')); 43 $order = "order_id DESC"; 44 45 $linemax = $objQuery->count($from, $where, $arrval); 46 $objPage->tpl_linemax = $linemax; 47 48 // 取得範囲の指定(開始行番号、行数のセット) 49 $objQuery->setlimitoffset(HISTORY_NUM, $pageNo); 50 // 表示順序 51 $objQuery->setorder($order); 52 53 //購入履歴の取得 54 $objPage->arrOrder = $objQuery->select($col, $from, $where, $arrval); 55 56 // next 57 if ($pageNo + HISTORY_NUM < $linemax) { 58 $next = "<a href='history.php?pageno=" . ($pageNo + HISTORY_NUM) . "'>次へ→</a>"; 59 } else { 60 $next = ""; 61 } 62 63 // previous 64 if ($pageNo - HISTORY_NUM > 0) { 65 $previous = "<a href='history.php?pageno=" . ($pageNo - HISTORY_NUM) . "'>←前へ</a>"; 66 } elseif ($pageNo == 0) { 67 $previous = ""; 68 } else { 69 $previous = "<a href='history.php?pageno=0'>←前へ</a>"; 70 } 71 72 // bar 73 if ($next != '' && $previous != '') { 74 $bar = " | "; 75 } else { 76 $bar = ""; 77 } 78 79 $objPage->tpl_strnavi = $previous . $bar . $next; 80 $objView->assignobj($objPage); //$objpage内の全てのテンプレート変数をsmartyに格納 81 $objView->display(SITE_FRAME); //パスとテンプレート変数の呼び出し、実行 19 $objPage = new LC_Page_Mypage_History_Ex(); 20 $objPage->mobileInit(); 21 $objPage->mobileProcess(); 22 register_shutdown_function(array($objPage, "destroy")); 82 23 ?> -
branches/feature-module-update/html/mobile/mypage/history_detail.php
r15532 r16238 1 1 <?php 2 2 /** 3 * 3 * 4 4 * Copyright(c) 2000-2007 LOCKON CO.,LTD. All Rights Reserved. 5 5 * 6 6 * http://www.lockon.co.jp/ 7 *8 7 * 9 * 履歴 8 * 9 * モバイルサイト/受注履歴詳細 10 10 */ 11 11 12 // {{{ requires 12 13 require_once("../require.php"); 14 require_once(CLASS_PATH . "page_extends/mypage/LC_Page_Mypage_HistoryDetail_Ex.php"); 13 15 14 class LC_Page { 15 function LC_Page() { 16 $this->tpl_mainpage = 'mypage/history_detail.tpl'; 17 $this->tpl_title = "MYページ/購入履歴詳細"; 18 session_cache_limiter('private-no-expire'); 19 } 20 } 16 // }}} 17 // {{{ generate page 21 18 22 $objPage = new LC_Page(); 23 $objView = new SC_MobileView(); 24 $objQuery = new SC_Query(); 25 $objCustomer = new SC_Customer(); 26 27 // レイアウトデザインを取得 28 $objPage = sfGetPageLayout($objPage, false, "mypage/index.php"); 29 30 //不正アクセス判定 31 $from = "dtb_order"; 32 $where = "del_flg = 0 AND customer_id = ? AND order_id = ? "; 33 $arrval = array($objCustomer->getValue('customer_id'), $_POST['order_id']); 34 //DBに情報があるか判定 35 $cnt = $objQuery->count($from, $where, $arrval); 36 37 //ログインしていない、またはDBに情報が無い場合 38 if (!$objCustomer->isLoginSuccess() or $cnt == 0){ 39 sfDispSiteError(CUSTOMER_ERROR, "", false, "", true); 40 } else { 41 //受注詳細データの取得 42 $objPage->arrDisp = lfGetOrderData($_POST['order_id']); 43 // 支払い方法の取得 44 $objPage->arrPayment = sfGetIDValueList("dtb_payment", "payment_id", "payment_method"); 45 // 配送時間の取得 46 $arrRet = sfGetDelivTime($objPage->arrDisp['payment_id']); 47 $objPage->arrDelivTime = sfArrKeyValue($arrRet, 'time_id', 'deliv_time'); 48 49 //マイページトップ顧客情報表示用 50 $objPage->CustomerName1 = $objCustomer->getvalue('name01'); 51 $objPage->CustomerName2 = $objCustomer->getvalue('name02'); 52 $objPage->CustomerPoint = $objCustomer->getvalue('point'); 53 } 54 55 $objView->assignobj($objPage); 56 $objView->display(SITE_FRAME); 57 //----------------------------------------------------------------------------------------------------------------------------------- 58 59 //受注詳細データの取得 60 function lfGetOrderData($order_id) { 61 //受注番号が数字であれば 62 if(sfIsInt($order_id)) { 63 // DBから受注情報を読み込む 64 $objQuery = new SC_Query(); 65 $col = "order_id, create_date, payment_id, subtotal, tax, use_point, add_point, discount, "; 66 $col .= "deliv_fee, charge, payment_total, deliv_name01, deliv_name02, deliv_kana01, deliv_kana02, "; 67 $col .= "deliv_zip01, deliv_zip02, deliv_pref, deliv_addr01, deliv_addr02, deliv_tel01, deliv_tel02, deliv_tel03, deliv_time_id, deliv_date "; 68 $from = "dtb_order"; 69 $where = "order_id = ?"; 70 $arrRet = $objQuery->select($col, $from, $where, array($order_id)); 71 $arrOrder = $arrRet[0]; 72 // 受注詳細データの取得 73 $arrRet = lfGetOrderDetail($order_id); 74 $arrOrderDetail = sfSwapArray($arrRet); 75 $arrData = array_merge($arrOrder, $arrOrderDetail); 76 } 77 return $arrData; 78 } 79 80 // 受注詳細データの取得 81 function lfGetOrderDetail($order_id) { 82 $objQuery = new SC_Query(); 83 $col = "product_id, product_code, product_name, classcategory_name1, classcategory_name2, price, quantity, point_rate"; 84 $where = "order_id = ?"; 85 $objQuery->setorder("classcategory_id1, classcategory_id2"); 86 $arrRet = $objQuery->select($col, "dtb_order_detail", $where, array($order_id)); 87 return $arrRet; 88 } 89 19 $objPage = new LC_Page_Mypage_HistoryDetail_Ex(); 20 $objPage->mobileInit(); 21 $objPage->mobileProcess(); 22 register_shutdown_function(array($objPage, "destroy")); 90 23 ?> -
branches/feature-module-update/html/mobile/mypage/order.php
r15532 r16238 1 1 <?php 2 2 /** 3 * 3 * 4 4 * Copyright(c) 2000-2007 LOCKON CO.,LTD. All Rights Reserved. 5 5 * 6 6 * http://www.lockon.co.jp/ 7 *8 7 * 9 * 履歴から注文を取得・登録し、カートに遷移する。 8 * 9 * モバイルサイト/購入履歴からカートへ 10 10 */ 11 12 // {{{ requires 11 13 require_once("../require.php"); 14 require_once(CLASS_PATH . "page_extends/mypage/LC_Page_Mypage_Order_Ex.php"); 12 15 13 $objCustomer = new SC_Customer(); 14 $objCartSess = new SC_CartSession(); 16 // }}} 17 // {{{ generate page 15 18 16 //受注詳細データの取得 17 $arrDisp = lfGetOrderDetail($_POST['order_id']); 18 19 //ログインしていない、またはDBに情報が無い場合 20 if (!$objCustomer->isLoginSuccess() or count($arrDisp) == 0){ 21 sfDispSiteError(CUSTOMER_ERROR, "", false, "", true); 22 } 23 24 for($num = 0; $num < count($arrDisp); $num++) { 25 $product_id = $arrDisp[$num]['product_id']; 26 $cate_id1 = $arrDisp[$num]['classcategory_id1']; 27 $cate_id2 = $arrDisp[$num]['classcategory_id2']; 28 $quantity = $arrDisp[$num]['quantity']; 29 30 $objCartSess->addProduct(array($product_id, $cate_id1, $cate_id2), $quantity); 31 } 32 33 header("Location: " . gfAddSessionId(MOBILE_URL_CART_TOP)); 34 35 36 //----------------------------------------------------------------------------------------------------------------------------------- 37 // 受注詳細データの取得 38 function lfGetOrderDetail($order_id) { 39 $objQuery = new SC_Query(); 40 $col = "product_id, classcategory_id1, classcategory_id2, quantity"; 41 $where = "order_id = ?"; 42 $objQuery->setorder("classcategory_id1, classcategory_id2"); 43 $arrRet = $objQuery->select($col, "dtb_order_detail", $where, array($order_id)); 44 return $arrRet; 45 } 46 19 $objPage = new LC_Page_Mypage_Order_Ex(); 20 $objPage->mobileInit(); 21 $objPage->mobileProcess(); 22 register_shutdown_function(array($objPage, "destroy")); 47 23 ?> -
branches/feature-module-update/html/mobile/mypage/refusal.php
r16170 r16238 7 7 * 8 8 * 9 * 退会処理9 * モバイルサイト/退会処理 10 10 */ 11 12 // {{{ requires 11 13 require_once("../require.php"); 14 require_once(CLASS_PATH . "page_extends/mypage/LC_Page_Mypage_Refusal_Ex.php"); 12 15 13 class LC_Page{ 14 function LC_Page(){ 15 $this->tpl_mainpage = 'mypage/refusal.tpl'; 16 $this->tpl_title = "MYページ/退会手続き(入力ページ)"; 17 //session_cache_limiter('private-no-expire'); 18 } 19 } 16 // }}} 17 // {{{ generate page 20 18 21 $objPage = new LC_Page(); 22 $objView = new SC_MobileView(); 23 $objCustomer = new SC_Customer(); 24 $objQuery = new SC_Query(); 25 26 //ログイン判定 27 if (!$objCustomer->isLoginSuccess()){ 28 SC_Utils_Ex::sfDispSiteError(CUSTOMER_ERROR, "", false, "", true); 29 }else { 30 //マイページトップ顧客情報表示用 31 $objPage->CustomerName1 = $objCustomer->getvalue('name01'); 32 $objPage->CustomerName2 = $objCustomer->getvalue('name02'); 33 $objPage->CustomerPoint = $objCustomer->getvalue('point'); 34 } 35 36 37 // レイアウトデザインを取得 38 //$objPage = sfGetPageLayout($objPage, false, "mypage/index.php"); 39 40 if (isset($_POST['no'])) { 41 header("Location: " . SC_Helper_Mobile_Ex::gfAddSessionId("index.php")); 42 exit; 43 } elseif (isset($_POST['complete'])){ 44 //会員削除 45 $objQuery->exec("UPDATE dtb_customer SET del_flg=1, update_date=now() WHERE customer_id=?", array($objCustomer->getValue('customer_id'))); 46 47 $where = "email = ?"; 48 $objCustomer->EndSession(); 49 //完了ページへ 50 header("Location: " . SC_Helper_Mobile_Ex::gfAddSessionId("refusal_complete.php")); 51 exit; 52 } 53 54 $objView->assignobj($objPage); 55 $objView->display(SITE_FRAME); 56 19 $objPage = new LC_Page_Mypage_Refusal_Ex(); 20 $objPage->mobileInit(); 21 $objPage->mobileProcess(); 22 register_shutdown_function(array($objPage, "destroy")); 57 23 ?> -
branches/feature-module-update/html/mobile/mypage/refusal_complete.php
r16170 r16238 7 7 * 8 8 * 9 * 退会完了9 * モバイルサイト/退会完了 10 10 */ 11 11 12 // {{{ requires 12 13 require_once("../require.php"); 14 require_once(CLASS_PATH . "page_extends/mypage/LC_Page_Mypage_RefusalComplete_Ex.php"); 13 15 14 class LC_Page{ 15 function LC_Page(){ 16 $this->tpl_mainpage = 'mypage/refusal_complete.tpl'; 17 $this->tpl_title = "MYページ/退会手続き(完了ページ)"; 18 $this->point_disp = false; 19 } 20 } 16 // }}} 17 // {{{ generate page 21 18 22 $objPage = new LC_Page(); 23 $objView = new SC_MobileView(); 24 25 $objCustomer = new SC_Customer(); 26 //マイページトップ顧客情報表示用 27 $objPage->CustomerName1 = $objCustomer->getvalue('name01'); 28 $objPage->CustomerName2 = $objCustomer->getvalue('name02'); 29 $objPage->CustomerPoint = $objCustomer->getvalue('point'); 30 31 // レイアウトデザインを取得 32 //$objPage = sfGetPageLayout($objPage, false, "mypage/index.php"); 33 34 $objView->assignobj($objPage); 35 $objView->display(SITE_FRAME); 36 19 $objPage = new LC_Page_Mypage_RefusalComplete_Ex(); 20 $objPage->mobileInit(); 21 $objPage->mobileProcess(); 22 register_shutdown_function(array($objPage, "destroy")); 37 23 ?>
Note: See TracChangeset
for help on using the changeset viewer.