Source for file LC_Page_Admin_Contents_CSV.php
Documentation is available at LC_Page_Admin_Contents_CSV.php
* This file is part of EC-CUBE
* Copyright(c) 2000-2010 LOCKON CO.,LTD. All Rights Reserved.
* http://www.lockon.co.jp/
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
require_once(CLASS_PATH . "pages/LC_Page.php");
require_once(CLASS_EX_PATH . "helper_extends/SC_Helper_CSV_Ex.php");
* @author LOCKON CO.,LTD.
$this->tpl_subnavi = 'contents/subnavi.tpl';
$this->tpl_subno = 'csv';
$this->tpl_subtitle = 'CSV出力設定';
$objCSV = new SC_Helper_CSV_Ex();
$this->arrSubnavi = $objCSV->arrSubnavi;
$this->tpl_subno_csv = $objCSV->arrSubnavi[1];
$this->arrSubnaviName = $objCSV->arrSubnaviName;
SC_Utils_Ex::sfIsSuccess($objSess);
$get_tpl_subno_csv = isset ($_GET['tpl_subno_csv'])
? $_GET['tpl_subno_csv'] : "";
// GETで値が送られている場合にはその値を元に画面表示を切り替える
if ($get_tpl_subno_csv != ""){
// 送られてきた値が配列に登録されていなければTOPを表示
if (in_array($get_tpl_subno_csv,$this->arrSubnavi)){
$subno_csv = $get_tpl_subno_csv;
$subno_csv = $this->arrSubnavi[1];
if (isset ($_POST['tpl_subno_csv'])
&& $_POST['tpl_subno_csv'] != "") {
$subno_csv = $_POST['tpl_subno_csv'];
$subno_csv = $this->arrSubnavi[1];
$subno_id = array_keys($this->arrSubnavi,$subno_csv);
$subno_id = $subno_id[0];
if (!isset ($_POST['mode'])) $_POST['mode'] = "";
if ($_POST["mode"] == "confirm") {
$this->arrErr = $this->lfCheckError($_POST['output_list']);
if (count($this->arrErr) <= 0){
$this->reload(array("tpl_subno_csv" => $subno_csv));
$arrOutput = SC_Utils_Ex::sfSwapArray($objCSV->sfgetCsvOutput($subno_csv, "WHERE csv_id = ? AND status = 1", array($subno_id)));
$arrOutput = SC_Utils_Ex::sfarrCombine($arrOutput['col'], $arrOutput['disp_name']);
$arrChoice = SC_Utils_Ex::sfSwapArray($objCSV->sfgetCsvOutput($subno_csv, "WHERE csv_id = ? AND status = 2", array($subno_id)));
if (!isset ($arrChoice['col'])) $arrChoice['col'] = array();
if (!isset ($arrChoice['disp_name'])) $arrChoice['disp_name'] = array();
$arrChoice = SC_Utils_Ex::sfarrCombine($arrChoice['col'], $arrChoice['disp_name']);
$this->arrOutput= $arrOutput;
$this->arrChoice= $arrChoice;
$this->SubnaviName = $this->arrSubnaviName[$subno_id];
$this->tpl_subno_csv = $subno_csv;
$objView->assignobj($this);
$objView->display(MAIN_FRAME);
$upd_sql = "UPDATE dtb_csv SET status = 2, rank = NULL, update_date = now() WHERE csv_id = ?";
$objQuery->query($upd_sql, array($csv_id));
foreach($arrData as $key => $val){
$upd_sql = "UPDATE dtb_csv SET status = 1, rank = ? WHERE csv_id = ? AND col = ? ";
$objQuery->query($upd_sql, array($key+ 1, $csv_id,$val));
$objErr->doFunc( array("出力項目", "output_list"), array("EXIST_CHECK") );
Documentation generated on Fri, 24 Feb 2012 13:58:34 +0900 by Seasoft
|