source: branches/mobile/html/mobile/mypage/history.php @ 11524

Revision 11524, 1.8 KB checked in by rebelt, 15 years ago (diff)

下記の問題点の修正です。

  • 検証結果1,2,3,7
  • MYページで簡単ログインが利用できない。
  • MYページで扱うメールアドレスがPCサイト用のものになっている。
  • メルマガ登録・解除の確認メールが文字化けする場合がある。
  • Property svn:eol-style set to native
Line 
1<?php
2/*
3 * MyPage
4 */
5
6require_once("../require.php");
7
8class LC_Page{
9    function LC_Page() {
10        $this->tpl_mainpage = 'mypage/history.tpl';
11        $this->tpl_title = 'MY¥Ú¡¼¥¸/¹ØÆþÍúÎò°ìÍ÷';
12        session_cache_limiter('private-no-expire');
13    }
14}
15
16define ("HISTORY_NUM", 5);
17
18$objPage = new LC_Page();
19$objView = new SC_SiteView();
20$objQuery = new SC_Query();
21$objCustomer = new SC_Customer();
22$pageNo = isset($_GET['pageno']) ? $_GET['pageno'] : 0;
23
24// ¥ì¥¤¥¢¥¦¥È¥Ç¥¶¥¤¥ó¤ò¼èÆÀ
25$objPage = sfGetPageLayout($objPage, false, "mypage/index.php");
26
27// ¥í¥°¥¤¥ó¥Á¥§¥Ã¥¯
28if(!isset($_SESSION['customer'])) {
29    sfDispSiteError(CUSTOMER_ERROR);
30}
31
32$col = "order_id, create_date, payment_id, payment_total";
33$from = "dtb_order";
34$where = "del_flg = 0 AND customer_id=?";
35$arrval = array($objCustomer->getvalue('customer_id'));
36$order = "order_id DESC";
37
38$linemax = $objQuery->count($from, $where, $arrval);
39$objPage->tpl_linemax = $linemax;
40
41// ¼èÆÀÈϰϤλØÄê(³«»Ï¹ÔÈֹ桢¹Ô¿ô¤Î¥»¥Ã¥È)
42$objQuery->setlimitoffset(HISTORY_NUM, $pageNo);
43// ɽ¼¨½ç½ø
44$objQuery->setorder($order);
45
46//¹ØÆþÍúÎò¤Î¼èÆÀ
47$objPage->arrOrder = $objQuery->select($col, $from, $where, $arrval);
48
49// next
50if ($pageNo + HISTORY_NUM < $linemax) {
51    $next = "<a href='history.php?pageno=" . ($pageNo + HISTORY_NUM) . "'>¼¡¤Ø¢ª</a>";
52} else {
53    $next = "";
54}
55
56// previous
57if ($pageNo - HISTORY_NUM > 0) {
58    $previous = "<a href='history.php?pageno=" . ($pageNo - HISTORY_NUM) . "'>¢«Á°¤Ø</a>";
59} elseif ($pageNo == 0) {
60    $previous = "";
61} else {
62    $previous = "<a href='history.php?pageno=0'>¢«Á°¤Ø</a>";
63}
64
65// bar
66if ($next != '' && $previous != '') {
67    $bar = " | ";
68} else {
69    $bar = "";
70}
71
72$objPage->tpl_strnavi = $previous . $bar . $next;
73$objView->assignobj($objPage);              //$objpageÆâ¤ÎÁ´¤Æ¤Î¥Æ¥ó¥×¥ì¡¼¥ÈÊÑ¿ô¤òsmarty¤Ë³ÊǼ
74$objView->display(SITE_FRAME);              //¥Ñ¥¹¤È¥Æ¥ó¥×¥ì¡¼¥ÈÊÑ¿ô¤Î¸Æ¤Ó½Ð¤·¡¢¼Â¹Ô
75?>
Note: See TracBrowser for help on using the repository browser.