source: branches/version-2_12-dev/data/class/pages/admin/contents/LC_Page_Admin_Contents_CSV.php @ 21864

Revision 21864, 3.9 KB checked in by h_yoshimoto, 12 years ago (diff)

#1831 Copyrightを更新

  • Property svn:eol-style set to LF
  • Property svn:keywords set to Id
  • Property svn:mime-type set to text/x-httpd-php; charset=UTF-8
Line 
1<?php
2/*
3 * This file is part of EC-CUBE
4 *
5 * Copyright(c) 2000-2012 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
25require_once CLASS_EX_REALDIR . 'page_extends/admin/LC_Page_Admin_Ex.php';
26
27/**
28 * CSV項目設定 のページクラス.
29 *
30 * @package Page
31 * @author LOCKON CO.,LTD.
32 * @version $Id$
33 */
34class LC_Page_Admin_Contents_CSV extends LC_Page_Admin_Ex {
35
36    // }}}
37    // {{{ functions
38
39    /**
40     * Page を初期化する.
41     *
42     * @return void
43     */
44    function init() {
45        parent::init();
46        $this->tpl_mainpage = 'contents/csv.tpl';
47        $this->tpl_subno = 'csv';
48        $this->tpl_mainno = 'contents';
49        $this->tpl_maintitle = 'コンテンツ管理';
50        $this->tpl_subtitle = 'CSV出力設定';
51
52        $objCSV = new SC_Helper_CSV_Ex();
53        $this->arrSubnavi = $objCSV->arrSubnavi; // 別名
54        $this->tpl_subno_csv = $objCSV->arrSubnavi[1]; //デフォルト
55        $this->arrSubnaviName = $objCSV->arrSubnaviName; // 表示名
56    }
57
58    /**
59     * Page のプロセス.
60     *
61     * @return void
62     */
63    function process() {
64        $this->action();
65        $this->sendResponse();
66    }
67
68    /**
69     * Page のアクション.
70     *
71     * @return void
72     */
73    function action() {
74
75        // パラメーター管理クラス
76        $objFormParam = new SC_FormParam_Ex();
77        // パラメーター設定
78        $this->lfInitParam($objFormParam);
79        $objFormParam->setParam($_POST);
80        $objFormParam->setParam($_GET);
81        $objFormParam->convParam();
82
83        // CSV_IDの読み込み
84        $this->tpl_subno_csv = $objFormParam->getValue('tpl_subno_csv');
85        $this->tpl_csv_id = $this->lfGetCsvId($this->tpl_subno_csv);
86
87        switch ($this->getMode()) {
88            case 'confirm':
89                // 入力パラメーターチェック
90                $this->arrErr = $objFormParam->checkError();
91                if (SC_Utils_Ex::isBlank($this->arrErr)) {
92                    // 更新
93                    $this->tpl_is_update = $this->lfUpdCsvOutput($this->tpl_csv_id, $objFormParam->getValue('output_list'));
94                }
95                break;
96            case 'defaultset':
97                //初期値に戻す
98                $this->tpl_is_update = $this->lfSetDefaultCsvOutput($this->tpl_csv_id);
99                break;
100            default:
101                break;
102        }
103        $this->arrSelected = $this->lfGetSelected($this->tpl_csv_id);
104        $this->arrOptions = $this->lfGetOptions($this->tpl_csv_id);
105        $this->tpl_subtitle .= '>' . $this->arrSubnaviName[ $this->tpl_csv_id ];
106
107        if ($this->tpl_is_update) {
108            $this->tpl_onload = "window.alert('正常に更新されました。');";
109        }
110
111    }
112
113    /**
114     * パラメーター情報の初期化
115     *
116     * @param array $objFormParam フォームパラメータークラス
117     * @return void
118     */
119    function lfInitParam(&$objFormParam) {
120        $objFormParam->addParam('編集種別', 'tpl_subno_csv', STEXT_LEN, 'a', array('ALNUM_CHECK', 'MAX_LENGTH_CHECK'), 'product');
121        $objFormParam->addParam('出力設定リスト', 'output_list', INT_LEN, 'n', array('NUM_CHECK', 'MAX_LENGTH_CHECK', 'EXIST_CHECK'));
122        //デフォルト値
Note: See TracBrowser for help on using the repository browser.