source: branches/feature-module-update/html/mypage/delivery.php @ 15532

Revision 15532, 2.2 KB checked in by nanasess, 17 years ago (diff)

svn:mime-type 修正

  • Property svn:keywords set to Id
  • Property svn:mime-type set to text/x-httpd-php; charset=UTF-8
Line 
1<?php
2/*
3 * Copyright(c) 2000-2007 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.