source: branches/mobile/html/mypage/index.php @ 6080

Revision 6080, 2.6 KB checked in by naka, 16 years ago (diff)

* empty log message *

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1<?php
2/*
3 * Copyright(c) 2000-2006 LOCKON CO.,LTD. All Rights Reserved.
4 *
5 * http://www.lockon.co.jp/
6 */
7
8//¥Ç¡¼¥¿¥Ù¡¼¥¹¤«¤é¾¦Éʸ¡º÷¤ò¼Â¹Ô¤¹¤ë¡£¡ÊEC¥­¥Ã¥ÈÆ°ºî»î¸³ÍѤγ«È¯¡Ë
9require_once("../require.php");
10
11class LC_Page{
12    function LC_Page() {
13        $this->tpl_mainpage = USER_PATH . 'templates/mypage/index.tpl';
14        $this->tpl_title = 'MY¥Ú¡¼¥¸/¹ØÆþÍúÎò°ìÍ÷';
15        $this->tpl_navi = USER_PATH . 'templates/mypage/navi.tpl';
16        $this->tpl_mainno = 'mypage';
17        $this->tpl_mypageno = 'index';
18        session_cache_limiter('private-no-expire');
19    }
20}
21
22$objPage = new LC_Page();
23$objView = new SC_SiteView();           
24$objQuery = new SC_Query();             
25$objCustomer = new SC_Customer();
26
27// ¥ì¥¤¥¢¥¦¥È¥Ç¥¶¥¤¥ó¤ò¼èÆÀ
28$objPage = sfGetPageLayout($objPage, false, "mypage/index.php");
29
30// ¥í¥°¥¤¥ó¥Á¥§¥Ã¥¯
31if(!isset($_SESSION['customer'])) {
32    sfDispSiteError(CUSTOMER_ERROR);
33}else {
34    //¥Þ¥¤¥Ú¡¼¥¸¥È¥Ã¥×¸ÜµÒ¾ðÊóɽ¼¨ÍÑ
35    $objPage->CustomerName1 = $objCustomer->getvalue('name01');
36    $objPage->CustomerName2 = $objCustomer->getvalue('name02');
37    $objPage->CustomerPoint = $objCustomer->getvalue('point');
38}
39
40//¥Ú¡¼¥¸Á÷¤êÍÑ
41$objPage->tpl_pageno = $_POST['pageno'];
42   
43$col = "order_id, create_date, payment_id, payment_total";
44$from = "dtb_order";
45$where = "del_flg = 0 AND customer_id=?";
46$arrval = array($objCustomer->getvalue('customer_id'));
47$order = "order_id DESC";
48
49$linemax = $objQuery->count($from, $where, $arrval);
50$objPage->tpl_linemax = $linemax;
51
52// ¥Ú¡¼¥¸Á÷¤ê¤Î¼èÆÀ
53$objNavi = new SC_PageNavi($_POST['pageno'], $linemax, SEARCH_PMAX, "fnNaviPage", NAVI_PMAX);
54$objPage->tpl_strnavi = $objNavi->strnavi;      // ɽ¼¨Ê¸»úÎó
55$startno = $objNavi->start_row;
56
57// ¼èÆÀÈϰϤλØÄê(³«»Ï¹ÔÈֹ桢¹Ô¿ô¤Î¥»¥Ã¥È)
58$objQuery->setlimitoffset(SEARCH_PMAX, $startno);
59// ɽ¼¨½ç½ø
60$objQuery->setorder($order);
61
62//¹ØÆþÍúÎò¤Î¼èÆÀ
63$objPage->arrOrder = $objQuery->select($col, $from, $where, $arrval);
64
65// »Ùʧ¤¤ÊýË¡¤Î¼èÆÀ
66$objPage->arrPayment = sfGetIDValueList("dtb_payment", "payment_id", "payment_method");
67
68$objView->assignobj($objPage);              //$objpageÆâ¤ÎÁ´¤Æ¤Î¥Æ¥ó¥×¥ì¡¼¥ÈÊÑ¿ô¤òsmarty¤Ë³ÊǼ
69$objView->display(SITE_FRAME);              //¥Ñ¥¹¤È¥Æ¥ó¥×¥ì¡¼¥ÈÊÑ¿ô¤Î¸Æ¤Ó½Ð¤·¡¢¼Â¹Ô
70
71
72//-------------------------------------------------------------------------------------------------------------------------
73                                           
74//¥¨¥é¡¼¥Á¥§¥Ã¥¯
75
76function lfErrorCheck() {
77    $objErr = new SC_CheckError();
78            $objErr->doFunc(array("¥á¡¼¥ë¥¢¥É¥ì¥¹", "login_email", STEXT_LEN), array("EXIST_CHECK","SPTAB_CHECK","EMAIL_CHECK","MAX_LENGTH_CHECK"));
79            $objErr->dofunc(array("¥Ñ¥¹¥ï¡¼¥É", "login_password", PASSWORD_LEN2), array("EXIST_CHECK","ALNUM_CHECK"));
80    return $objErr->arrErr;
81}
82               
83?>
Note: See TracBrowser for help on using the repository browser.