Page
[ class tree: Page ] [ index: Page ] [ all elements ]

Source for file LC_Page_Admin_Basis_Delivery.php

Documentation is available at LC_Page_Admin_Basis_Delivery.php

  1. <?php
  2. /*
  3.  * This file is part of EC-CUBE
  4.  *
  5.  * Copyright(c) 2000-2010 LOCKON CO.,LTD. All Rights Reserved.
  6.  *
  7.  * http://www.lockon.co.jp/
  8.  *
  9.  * This program is free software; you can redistribute it and/or
  10.  * modify it under the terms of the GNU General Public License
  11.  * as published by the Free Software Foundation; either version 2
  12.  * of the License, or (at your option) any later version.
  13.  *
  14.  * This program is distributed in the hope that it will be useful,
  15.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  17.  * GNU General Public License for more details.
  18.  *
  19.  * You should have received a copy of the GNU General Public License
  20.  * along with this program; if not, write to the Free Software
  21.  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  22.  */
  23.  
  24. // {{{ requires
  25. require_once(CLASS_PATH "pages/LC_Page.php");
  26.  
  27. /**
  28.  * 配送業者設定 のページクラス.
  29.  *
  30.  * @package Page
  31.  * @author LOCKON CO.,LTD.
  32.  * @version $Id: LC_Page_Admin_Basis_Delivery.php 18735 2010-06-22 08:53:31Z nanasess $
  33.  */
  34.  
  35.     // }}}
  36.     // {{{ functions
  37.  
  38.     /**
  39.      * Page を初期化する.
  40.      *
  41.      * @return void 
  42.      */
  43.     function init({
  44.         parent::init();
  45.         $this->tpl_mainpage = 'basis/delivery.tpl';
  46.         $this->tpl_subnavi 'basis/subnavi.tpl';
  47.         $this->tpl_subno 'delivery';
  48.         $this->tpl_mainno = 'basis';
  49.         $masterData new SC_DB_MasterData_Ex();
  50.         $this->arrPref $masterData->getMasterData("mtb_pref"array("pref_id""pref_name""rank"));
  51.         $this->arrTAXRULE $masterData->getMasterData("mtb_taxrule");
  52.         $this->tpl_subtitle '配送業者設定';
  53.     }
  54.  
  55.     /**
  56.      * Page のプロセス.
  57.      *
  58.      * @return void 
  59.      */
  60.     function process({
  61.         $conn new SC_DBConn();
  62.         $objView new SC_AdminView();
  63.         $objSess new SC_Session();
  64.         $objQuery new SC_Query();
  65.         $objDb new SC_Helper_DB_Ex();
  66.  
  67.         // 認証可否の判定
  68.         SC_Utils_Ex::sfIsSuccess($objSess);
  69.  
  70.         if (!isset($_POST['mode'])) $_POST['mode'"";
  71.  
  72.         switch($_POST['mode']{
  73.         case 'delete':
  74.             // ランク付きレコードの削除
  75.             $objDb->sfDeleteRankRecord("dtb_deliv""deliv_id"$_POST['deliv_id']);
  76.             // 再表示
  77.             SC_Utils_Ex::sfReload();
  78.             break;
  79.         case 'up':
  80.             $objDb->sfRankUp("dtb_deliv""deliv_id"$_POST['deliv_id']);
  81.             // 再表示
  82.             SC_Utils_Ex::sfReload();
  83.             break;
  84.         case 'down':
  85.             $objDb->sfRankDown("dtb_deliv""deliv_id"$_POST['deliv_id']);
  86.             // 再表示
  87.             SC_Utils_Ex::sfReload();
  88.             break;
  89.         default:
  90.             break;
  91.         }
  92.  
  93.         // 配送業者一覧の取得
  94.         $col "deliv_id, name, service_name";
  95.         $where "del_flg = 0";
  96.         $table "dtb_deliv";
  97.         $objQuery->setOrder("rank DESC");
  98.         $this->arrDelivList $objQuery->select($col$table$where);
  99.  
  100.         $objView->assignobj($this);
  101.         $objView->display(MAIN_FRAME);
  102.     }
  103.  
  104.     /**
  105.      * デストラクタ.
  106.      *
  107.      * @return void 
  108.      */
  109.     function destroy({
  110.         parent::destroy();
  111.     }
  112. }
  113. ?>

Documentation generated on Fri, 24 Feb 2012 13:58:26 +0900 by Seasoft