source: temp/branches/mobile/html/mypage/delivery.php @ 6080

Revision 6080, 2.1 KB checked in by naka, 17 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 */
7require_once("../require.php");
8
9class LC_Page{
10    function LC_Page(){
11        $this->tpl_mainpage = USER_PATH . 'templates/mypage/delivery.tpl';
12        $this->tpl_title = "MY¥Ú¡¼¥¸/¤ªÆϤ±ÀèÄɲÎ¥Êѹ¹";
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
28//¥í¥°¥¤¥óȽÄê
29if(!$objCustomer->isLoginSuccess()) {
30    sfDispSiteError(CUSTOMER_ERROR);
31}else {
32    //¥Þ¥¤¥Ú¡¼¥¸¥È¥Ã¥×¸ÜµÒ¾ðÊóɽ¼¨ÍÑ
33    $objPage->CustomerName1 = $objCustomer->getvalue('name01');
34    $objPage->CustomerName2 = $objCustomer->getvalue('name02');
35    $objPage->CustomerPoint = $objCustomer->getvalue('point');
36}
37
38
39// ¥ì¥¤¥¢¥¦¥È¥Ç¥¶¥¤¥ó¤ò¼èÆÀ
40$objPage = sfGetPageLayout($objPage, false, "mypage/index.php");
41
42//ºï½ü
43if($_POST['mode'] == 'delete') {
44    //ÉÔÀµ¥¢¥¯¥»¥¹È½Äê
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) {
47        //ºï½ü
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
61//¤ªÆϤ±ÀèÅÐÏ¿·ï¿ô¼èÆÀ
62$linemax = $objQuery->count($from, $where, $arrval);
63
64$objPage->tpl_linemax = $linemax;
65
66// ɽ¼¨½ç½ø
67$objQuery->setorder($order);
68
69//Ê̤ΤªÆϤ±Àè¾ðÊóɽ¼¨
70$objPage->arrOtherDeliv = $objQuery->select("*", $from, $where, $arrval);
71
72//¤ªÆϤ±ÀèÅÐÏ¿¿ô¤ò¥Æ¥ó¥×¥ì¡¼¥È¤ËÅϤ¹
73$objPge->deliv_cnt = count($objPage->arrOtherDeliv);
74
75$objView->assignobj($objPage);
76$objView->display(SITE_FRAME);
77
78//-----------------------------------------------------------------------------------------------------------------------------------
79
80?>
Note: See TracBrowser for help on using the repository browser.