source: branches/dev/html/mypage/index.php @ 13576

Revision 13576, 2.6 KB checked in by adati, 17 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
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//¥Ú¡¼¥¸Á÷¤êÍÑ
41if (isset($_POST['pageno'])) {
42    $objPage->tpl_pageno = htmlspecialchars($_POST['pageno'], ENT_QUOTES, CHAR_CODE);
43}
44
45$col = "order_id, create_date, payment_id, payment_total";
46$from = "dtb_order";
47$where = "del_flg = 0 AND customer_id=?";
48$arrval = array($objCustomer->getvalue('customer_id'));
49$order = "order_id DESC";
50
51$linemax = $objQuery->count($from, $where, $arrval);
52$objPage->tpl_linemax = $linemax;
53
54// ¥Ú¡¼¥¸Á÷¤ê¤Î¼èÆÀ
55$objNavi = new SC_PageNavi($_POST['pageno'], $linemax, SEARCH_PMAX, "fnNaviPage", NAVI_PMAX);
56$objPage->tpl_strnavi = $objNavi->strnavi;      // ɽ¼¨Ê¸»úÎó
57$startno = $objNavi->start_row;
58
59// ¼èÆÀÈϰϤλØÄê(³«»Ï¹ÔÈֹ桢¹Ô¿ô¤Î¥»¥Ã¥È)
60$objQuery->setlimitoffset(SEARCH_PMAX, $startno);
61// ɽ¼¨½ç½ø
62$objQuery->setorder($order);
63
64//¹ØÆþÍúÎò¤Î¼èÆÀ
65$objPage->arrOrder = $objQuery->select($col, $from, $where, $arrval);
66
67// »Ùʧ¤¤ÊýË¡¤Î¼èÆÀ
68$objPage->arrPayment = sfGetIDValueList("dtb_payment", "payment_id", "payment_method");
69
70$objView->assignobj($objPage);              //$objpageÆâ¤ÎÁ´¤Æ¤Î¥Æ¥ó¥×¥ì¡¼¥ÈÊÑ¿ô¤òsmarty¤Ë³ÊǼ
71$objView->display(SITE_FRAME);              //¥Ñ¥¹¤È¥Æ¥ó¥×¥ì¡¼¥ÈÊÑ¿ô¤Î¸Æ¤Ó½Ð¤·¡¢¼Â¹Ô
72
73
74//-------------------------------------------------------------------------------------------------------------------------
75
76//¥¨¥é¡¼¥Á¥§¥Ã¥¯
77
78function lfErrorCheck() {
79    $objErr = new SC_CheckError();
80            $objErr->doFunc(array("¥á¡¼¥ë¥¢¥É¥ì¥¹", "login_email", STEXT_LEN), array("EXIST_CHECK","SPTAB_CHECK","EMAIL_CHECK","MAX_LENGTH_CHECK"));
81            $objErr->dofunc(array("¥Ñ¥¹¥ï¡¼¥É", "login_password", PASSWORD_LEN2), array("EXIST_CHECK","ALNUM_CHECK"));
82    return $objErr->arrErr;
83}
84
85?>
Note: See TracBrowser for help on using the repository browser.