[5] | 1 | <?php |
---|
| 2 | /* |
---|
[15] | 3 | * Copyright(c) 2000-2007 LOCKON CO.,LTD. All Rights Reserved. |
---|
[5] | 4 | * |
---|
| 5 | * http://www.lockon.co.jp/ |
---|
| 6 | */ |
---|
| 7 | require_once("../require.php"); |
---|
| 8 | |
---|
| 9 | class LC_Page{ |
---|
| 10 | function LC_Page(){ |
---|
| 11 | $this->tpl_mainpage = USER_PATH . 'templates/mypage/delivery.tpl'; |
---|
[11730] | 12 | $this->tpl_title = "MY¥Ú¡¼¥¸/¤ªÆϤ±ÀèÄɲåÊѹ¹"; |
---|
[5] | 13 | $this->tpl_navi = USER_PATH . 'templates/mypage/navi.tpl'; |
---|
| 14 | $this->tpl_mainno = 'mypage'; |
---|
| 15 | $this->tpl_mypageno = 'delivery'; |
---|
| 16 | global $arrPref; |
---|
| 17 | $this->arrPref= $arrPref; |
---|
| 18 | session_cache_limiter('private-no-expire'); |
---|
| 19 | } |
---|
| 20 | } |
---|
| 21 | |
---|
| 22 | $objPage = new LC_Page(); |
---|
| 23 | $objView = new SC_SiteView(); |
---|
| 24 | $objCustomer = new SC_Customer(); |
---|
| 25 | $objQuery = new SC_Query(); |
---|
| 26 | $objConn = new SC_DBConn(); |
---|
| 27 | |
---|
[11730] | 28 | //¥í¥°¥¤¥óȽÄê |
---|
[5] | 29 | if(!$objCustomer->isLoginSuccess()) { |
---|
| 30 | sfDispSiteError(CUSTOMER_ERROR); |
---|
| 31 | }else { |
---|
[11730] | 32 | //¥Þ¥¤¥Ú¡¼¥¸¥È¥Ã¥×¸ÜµÒ¾ðÊóɽ¼¨ÍÑ |
---|
[5] | 33 | $objPage->CustomerName1 = $objCustomer->getvalue('name01'); |
---|
| 34 | $objPage->CustomerName2 = $objCustomer->getvalue('name02'); |
---|
| 35 | $objPage->CustomerPoint = $objCustomer->getvalue('point'); |
---|
| 36 | } |
---|
| 37 | |
---|
| 38 | |
---|
[11730] | 39 | // ¥ì¥¤¥¢¥¦¥È¥Ç¥¶¥¤¥ó¤ò¼èÆÀ |
---|
[5] | 40 | $objPage = sfGetPageLayout($objPage, false, "mypage/index.php"); |
---|
| 41 | |
---|
[11730] | 42 | //ºï½ü |
---|
[5] | 43 | if($_POST['mode'] == 'delete') { |
---|
[11730] | 44 | //ÉÔÀµ¥¢¥¯¥»¥¹È½Äê |
---|
[5] | 45 | $flag = $objQuery->count("dtb_other_deliv", "customer_id=? AND other_deliv_id=?", array($objCustomer->getValue('customer_id'), $_POST['other_deliv_id'])); |
---|
| 46 | if($flag > 0) { |
---|
[11730] | 47 | //ºï½ü |
---|
[5] | 48 | $objQuery->delete("dtb_other_deliv", "other_deliv_id=?", array($_POST['other_deliv_id'])); |
---|
| 49 | } else { |
---|
| 50 | sfDispSiteError(CUSTOMER_ERROR); |
---|
| 51 | } |
---|
| 52 | } |
---|
| 53 | |
---|
| 54 | $objPage->tpl_pageno = $_POST['pageno']; |
---|
| 55 | |
---|
| 56 | $from = "dtb_other_deliv"; |
---|
| 57 | $where = "customer_id=?"; |
---|
| 58 | $arrval = array($objCustomer->getValue('customer_id')); |
---|
| 59 | $order = "other_deliv_id DESC"; |
---|
| 60 | |
---|
[11730] | 61 | //¤ªÆϤ±ÀèÅÐÏ¿·ï¿ô¼èÆÀ |
---|
[5] | 62 | $linemax = $objQuery->count($from, $where, $arrval); |
---|
| 63 | |
---|
| 64 | $objPage->tpl_linemax = $linemax; |
---|
| 65 | |
---|
[11730] | 66 | // ɽ¼¨½ç½ø |
---|
[5] | 67 | $objQuery->setorder($order); |
---|
| 68 | |
---|
[11730] | 69 | //Ê̤ΤªÆϤ±Àè¾ðÊóɽ¼¨ |
---|
[5] | 70 | $objPage->arrOtherDeliv = $objQuery->select("*", $from, $where, $arrval); |
---|
| 71 | |
---|
[11730] | 72 | //¤ªÆϤ±ÀèÅÐÏ¿¿ô¤ò¥Æ¥ó¥×¥ì¡¼¥È¤ËÅϤ¹ |
---|
[5] | 73 | $objPge->deliv_cnt = count($objPage->arrOtherDeliv); |
---|
| 74 | |
---|
| 75 | $objView->assignobj($objPage); |
---|
| 76 | $objView->display(SITE_FRAME); |
---|
| 77 | |
---|
| 78 | //----------------------------------------------------------------------------------------------------------------------------------- |
---|
| 79 | |
---|
| 80 | ?> |
---|