source: temp/trunk/html/mypage/delivery.php @ 2360

Revision 2360, 2.1 KB checked in by kakinaka, 20 years ago (diff)

blank

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