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