1 | <?php |
---|
2 | /* |
---|
3 | * This file is part of EC-CUBE |
---|
4 | * |
---|
5 | * Copyright(c) 2000-2007 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$ |
---|
33 | */ |
---|
34 | class LC_Page_Admin_Products_ProductClass extends LC_Page { |
---|
35 | |
---|
36 | // }}} |
---|
37 | // {{{ functions |
---|
38 | |
---|
39 | /** |
---|
40 | * Page を初期化する. |
---|
41 | * |
---|
42 | * @return void |
---|
43 | */ |
---|
44 | function init() { |
---|
45 | parent::init(); |
---|
46 | $this->tpl_mainpage = 'products/product_class.tpl'; |
---|
47 | $this->tpl_subnavi = 'products/subnavi.tpl'; |
---|
48 | $this->tpl_mainno = 'products'; |
---|
49 | $this->tpl_subno = 'product'; |
---|
50 | $this->tpl_subtitle = '商品登録'; |
---|
51 | |
---|
52 | $masterData = new SC_DB_MasterData_Ex(); |
---|
53 | $this->arrSRANK = $masterData->getMasterData("mtb_srank"); |
---|
54 | $this->arrDISP = $masterData->getMasterData("mtb_disp"); |
---|
55 | $this->arrCLASS = $masterData->getMasterData("mtb_class"); |
---|
56 | $this->arrSTATUS = $masterData->getMasterData("mtb_status"); |
---|
57 | $this->tpl_onload = ""; |
---|
58 | } |
---|
59 | |
---|
60 | /** |
---|
61 | * Page のプロセス. |
---|
62 | * |
---|
63 | * @return void |
---|
64 | */ |
---|
65 | function process() { |
---|
66 | $objView = new SC_AdminView(); |
---|
67 | // 認証可否の判定 |
---|
68 | $objSess = new SC_Session(); |
---|
69 | SC_Utils_Ex::sfIsSuccess($objSess); |
---|
70 | |
---|
71 | // 検索パラメータの引き継ぎ |
---|
72 | foreach ($_POST as $key => $val) { |
---|
73 | if (ereg("^search_", $key)) { |
---|
74 | $this->arrSearchHidden[$key] = $val; |
---|
75 | } |
---|
76 | } |
---|
77 | |
---|
78 | $this->tpl_product_id = |
---|
79 | isset($_POST['product_id']) ? $_POST['product_id'] : "" ; |
---|
80 | |
---|
81 | $this->tpl_pageno = isset($_POST['pageno']) ? $_POST['pageno'] : ""; |
---|
82 | |
---|
83 | if (!isset($_POST['mode'])) $_POST['mode'] = ""; |
---|
84 | |
---|
85 | switch($_POST['mode']) { |
---|
86 | // 規格削除要求 |
---|
87 | case 'delete': |
---|
88 | $objQuery = new SC_Query(); |
---|
89 | |
---|
90 | $objQuery->setLimitOffset(1); |
---|
91 | $where = "product_id = ? AND NOT (classcategory_id1 = 0 AND classcategory_id2 = 0)"; |
---|
92 | $objQuery->setOrder("rank1 DESC, rank2 DESC"); |
---|
93 | $arrRet = $objQuery->select("*", "vw_cross_products_class AS crs_prd", $where, array($_POST['product_id'])); |
---|
94 | |
---|
95 | if(count($arrRet) > 0) { |
---|
96 | |
---|
97 | $sqlval['product_id'] = $arrRet[0]['product_id']; |
---|
98 | $sqlval['classcategory_id1'] = '0'; |
---|
99 | $sqlval['classcategory_id2'] = '0'; |
---|
100 | $sqlval['product_code'] = $arrRet[0]['product_code']; |
---|
101 | $sqlval['stock'] = $arrRet[0]['stock']; |
---|
102 | $sqlval['price01'] = $arrRet[0]['price01']; |
---|
103 | $sqlval['price02'] = $arrRet[0]['price02']; |
---|
104 | $sqlval['creator_id'] = $_SESSION['member_id']; |
---|
105 | $sqlval['create_date'] = "now()"; |
---|
106 | $sqlval['update_date'] = "now()"; |
---|
107 | |
---|
108 | $objQuery->begin(); |
---|
109 | $where = "product_id = ?"; |
---|
110 | $objQuery->delete("dtb_products_class", $where, array($_POST['product_id'])); |
---|
111 | $objQuery->insert("dtb_products_class", $sqlval); |
---|
112 | |
---|
113 | $objQuery->commit(); |
---|
114 | } |
---|
115 | |
---|
116 | $this->lfProductClassPage(); // 規格登録ページ |
---|
117 | break; |
---|
118 | |
---|
119 | // 編集要求 |
---|
120 | case 'pre_edit': |
---|
121 | $objQuery = new SC_Query(); |
---|
122 | $where = "product_id = ? AND NOT(classcategory_id1 = 0 AND classcategory_id2 = 0) "; |
---|
123 | $ret = $objQuery->count("dtb_products_class", $where, array($_POST['product_id'])); |
---|
124 | |
---|
125 | if($ret > 0) { |
---|
126 | // 規格組み合わせ一覧の取得(DBの値を優先する。) |
---|
127 | $this->arrClassCat = $this->lfGetClassCatListEdit($_POST['product_id']); |
---|
128 | } |
---|
129 | $this->lfProductClassPage(); // 規格登録ページ |
---|
130 | break; |
---|
131 | // 規格組み合わせ表示 |
---|
132 | case 'disp': |
---|
133 | $this->arrForm['select_class_id1'] = $_POST['select_class_id1']; |
---|
134 | $this->arrForm['select_class_id2'] = $_POST['select_class_id2']; |
---|
135 | |
---|
136 | $this->arrErr = $this->lfClassError(); |
---|
137 | if (count($this->arrErr) == 0) { |
---|
138 | // 規格組み合わせ一覧の取得 |
---|
139 | $this->arrClassCat = $this->lfGetClassCatListDisp($_POST['select_class_id1'], $_POST['select_class_id2']); |
---|
140 | } |
---|
141 | $this->lfProductClassPage(); // 規格登録ページ |
---|
142 | break; |
---|
143 | // 規格登録要求 |
---|
144 | case 'edit': |
---|
145 | // 入力値の変換 |
---|
146 | $this->arrForm = $this->lfConvertParam($_POST); |
---|
147 | // エラーチェック |
---|
148 | $this->arrErr = $this->lfProductClassError($this->arrForm); |
---|
149 | |
---|
150 | if(count($this->arrErr) == 0) { |
---|
151 | // 確認ページ設定 |
---|
152 | $this->tpl_mainpage = 'products/product_class_confirm.tpl'; |
---|
153 | $this->lfProductConfirmPage(); // 確認ページ表示 |
---|
154 | } else { |
---|
155 | // 規格組み合わせ一覧の取得 |
---|
156 | $this->arrClassCat = $this->lfGetClassCatListDisp($_POST['class_id1'], $_POST['class_id2'], false); |
---|
157 | $this->lfProductClassPage(); // 規格登録ページ |
---|
158 | } |
---|
159 | break; |
---|
160 | // 確認ページからの戻り |
---|
161 | case 'confirm_return': |
---|
162 | // フォームパラメータの引き継ぎ |
---|
163 | $this->arrForm = $_POST; |
---|
164 | // 規格の選択情報は引き継がない。 |
---|
165 | $this->arrForm['select_class_id1'] = ""; |
---|
166 | $this->arrForm['select_class_id2'] = ""; |
---|
167 | // 規格組み合わせ一覧の取得(デフォルト値は出力しない) |
---|
168 | $this->arrClassCat = $this->lfGetClassCatListDisp($_POST['class_id1'], $_POST['class_id2'], false); |
---|
169 | $this->lfProductClassPage(); // 規格登録ページ |
---|
170 | break; |
---|
171 | case 'complete': |
---|
172 | // 完了ページ設定 |
---|
173 | $this->tpl_mainpage = 'products/product_class_complete.tpl'; |
---|
174 | // 商品規格の登録 |
---|
175 | $this->lfInsertProductClass($_POST, $_POST['product_id']); |
---|
176 | break; |
---|
177 | default: |
---|
178 | $this->lfProductClassPage(); // 規格登録ページ |
---|
179 | break; |
---|
180 | } |
---|
181 | |
---|
182 | $objView->assignobj($this); |
---|
183 | $objView->display(MAIN_FRAME); |
---|
184 | } |
---|
185 | |
---|
186 | /** |
---|
187 | * デストラクタ. |
---|
188 | * |
---|
189 | * @return void |
---|
190 | */ |
---|
191 | function destroy() { |
---|
192 | parent::destroy(); |
---|
193 | } |
---|
194 | |
---|
195 | /* 規格登録ページ表示用 */ |
---|
196 | function lfProductClassPage() { |
---|
197 | $objDb = new SC_Helper_DB_Ex(); |
---|
198 | |
---|
199 | $this->arrHidden = $_POST; |
---|
200 | $this->arrHidden['select_class_id1'] = ""; |
---|
201 | $this->arrHidden['select_class_id2'] = ""; |
---|
202 | $arrClass = $objDb->sfGetIDValueList("dtb_class", 'class_id', 'name'); |
---|
203 | |
---|
204 | // 規格分類が登録されていない規格は表示しないようにする。 |
---|
205 | $arrClassCatCount = SC_Utils_Ex::sfGetClassCatCount(); |
---|
206 | if( count($arrClass) > 0 ){ |
---|
207 | foreach($arrClass as $key => $val) { |
---|
208 | if($arrClassCatCount[$key] > 0) { |
---|
209 | $this->arrClass[$key] = $arrClass[$key]; |
---|
210 | } |
---|
211 | } |
---|
212 | } |
---|
213 | // 商品名を取得 |
---|
214 | $objQuery = new SC_Query(); |
---|
215 | $product_name = $objQuery->getOne("SELECT name FROM dtb_products WHERE product_id = ?", array($_POST['product_id'])); |
---|
216 | $this->arrForm['product_name'] = $product_name; |
---|
217 | } |
---|
218 | |
---|
219 | /** |
---|
220 | * デフォルトの表示 |
---|
221 | * |
---|
222 | * @param object $objQuery |
---|
223 | * @param integer $product_id 製品のID |
---|
224 | * @param integer $max 表示される最大値 |
---|
225 | */ |
---|
226 | function lfSetDefaultClassCat($objQuery, $product_id, $max) { |
---|
227 | |
---|
228 | // デフォルト値の読込 |
---|
229 | $col = "product_class_id, product_code, price01, price02, stock, stock_unlimited"; |
---|
230 | $arrRet = $objQuery->select($col, "dtb_products_class", "product_id = ? AND classcategory_id1 = 0 AND classcategory_id2 = 0", array($product_id));; |
---|
231 | |
---|
232 | if(count($arrRet) > 0) { |
---|
233 | $no = 1; |
---|
234 | for($cnt = 0; $cnt < $max; $cnt++) { |
---|
235 | $this->arrForm["product_class_id:".$no] = $arrRet[0]['product_class_id']; |
---|
236 | $this->arrForm["product_code:".$no] = $arrRet[0]['product_code']; |
---|
237 | $this->arrForm['stock:'.$no] = $arrRet[0]['stock']; |
---|
238 | $this->arrForm['price01:'.$no] = $arrRet[0]['price01']; |
---|
239 | $this->arrForm['price02:'.$no] = $arrRet[0]['price02']; |
---|
240 | $this->arrForm['stock_unlimited:'.$no] = $arrRet[0]['stock_unlimited']; |
---|
241 | $no++; |
---|
242 | } |
---|
243 | } |
---|
244 | } |
---|
245 | |
---|
246 | /* 規格組み合わせ一覧の取得 */ |
---|
247 | function lfGetClassCatListDisp($class_id1, $class_id2, $default = true) { |
---|
248 | $objQuery = new SC_Query(); |
---|
249 | |
---|
250 | if($class_id2 != "") { |
---|
251 | // 規格1と規格2 |
---|
252 | $sql = "SELECT * "; |
---|
253 | $sql.= "FROM vw_cross_class AS crs_cls "; |
---|
254 | $sql.= "WHERE class_id1 = ? AND class_id2 = ? ORDER BY rank1 DESC, rank2 DESC;"; |
---|
255 | $arrRet = $objQuery->getall($sql, array($class_id1, $class_id2)); |
---|
256 | } else { |
---|
257 | // 規格1のみ |
---|
258 | $sql = "SELECT * "; |
---|
259 | $sql.= "FROM vw_cross_class AS crs_cls "; |
---|
260 | $sql.= "WHERE class_id1 = ? AND class_id2 = 0 ORDER BY rank1 DESC;"; |
---|
261 | $arrRet = $objQuery->getall($sql, array($class_id1)); |
---|
262 | |
---|
263 | } |
---|
264 | |
---|
265 | $max = count($arrRet); |
---|
266 | |
---|
267 | if($default) { |
---|
268 | // デフォルト値を設定 |
---|
269 | $this->lfSetDefaultClassCat($objQuery, $_POST['product_id'], $max); |
---|
270 | } |
---|
271 | |
---|
272 | $this->arrForm["class_id1"] = $arrRet[0]['class_id1']; |
---|
273 | $this->arrForm["class_id2"] = $arrRet[0]['class_id2']; |
---|
274 | $this->tpl_onload.= "fnCheckAllStockLimit('$max', '" . DISABLED_RGB . "');"; |
---|
275 | |
---|
276 | return $arrRet; |
---|
277 | } |
---|
278 | |
---|
279 | /* 規格組み合わせ一覧の取得(編集画面) */ |
---|
280 | function lfGetClassCatListEdit($product_id) { |
---|
281 | // 既存編集の場合 |
---|
282 | $objQuery = new SC_Query(); |
---|
283 | |
---|
284 | $col = "class_id1, class_id2, name1, name2, rank1, rank2, "; |
---|
285 | $col.= "product_class_id, product_id, T1_classcategory_id AS classcategory_id1, T2_classcategory_id AS classcategory_id2, "; |
---|
286 | $col.= "product_code, stock, stock_unlimited, sale_limit, price01, price02, status"; |
---|
287 | |
---|
288 | $sql = "SELECT $col FROM "; |
---|
289 | $sql.= "( "; |
---|
290 | $sql.= "SELECT T1.class_id AS class_id1, T2.class_id AS class_id2, T1.classcategory_id AS T1_classcategory_id, T2.classcategory_id AS T2_classcategory_id, T1.name AS name1, T2.name AS name2, T1.rank AS rank1, T2.rank AS rank2 "; |
---|
291 | $sql.= "FROM dtb_classcategory AS T1, dtb_classcategory AS T2 "; |
---|
292 | $sql.= "WHERE T1.class_id IN (SELECT class_id1 FROM vw_cross_products_class AS crs_prd WHERE product_id = ? GROUP BY class_id1, class_id2) AND T2.class_id IN (SELECT class_id2 FROM vw_cross_products_class AS crs_prd WHERE product_id = ? GROUP BY class_id1, class_id2)"; |
---|
293 | $sql.= ") AS T1 "; |
---|
294 | |
---|
295 | $sql.= "LEFT JOIN (SELECT * FROM dtb_products_class WHERE product_id = ?) AS T3 "; |
---|
296 | $sql.= "ON T1_classcategory_id = T3.classcategory_id1 AND T2_classcategory_id = T3.classcategory_id2 "; |
---|
297 | $sql.= "ORDER BY rank1 DESC, rank2 DESC"; |
---|
298 | |
---|
299 | $arrList = $objQuery->getAll($sql, array($product_id, $product_id, $product_id)); |
---|
300 | |
---|
301 | $this->arrForm["class_id1"] = $arrList[0]['class_id1']; |
---|
302 | $this->arrForm["class_id2"] = $arrList[0]['class_id2']; |
---|
303 | |
---|
304 | $max = count($arrList); |
---|
305 | |
---|
306 | // デフォルト値を設定 |
---|
307 | $this->lfSetDefaultClassCat($objQuery, $product_id, $max); |
---|
308 | $no = 1; |
---|
309 | for($cnt = 0; $cnt < $max; $cnt++) { |
---|
310 | $this->arrForm["classcategory_id1:".$no] = $arrList[$cnt]['classcategory_id1']; |
---|
311 | $this->arrForm["classcategory_id2:".$no] = $arrList[$cnt]['classcategory_id2']; |
---|
312 | $this->arrForm["product_class_id:".$no] = $arrList[$cnt]['product_class_id']; |
---|
313 | if($arrList[$cnt]['product_id'] != "") { |
---|
314 | $this->arrForm["product_code:".$no] = $arrList[$cnt]['product_code']; |
---|
315 | $this->arrForm['stock:'.$no] = $arrList[$cnt]['stock']; |
---|
316 | $this->arrForm['stock_unlimited:'.$no] = $arrList[$cnt]['stock_unlimited']; |
---|
317 | $this->arrForm['price01:'.$no] = $arrList[$cnt]['price01']; |
---|
318 | $this->arrForm['price02:'.$no] = $arrList[$cnt]['price02']; |
---|
319 | // JavaScript初期化用文字列 |
---|
320 | $line.= "'check:".$no."',"; |
---|
321 | } |
---|
322 | $no++; |
---|
323 | } |
---|
324 | |
---|
325 | $line = ereg_replace(",$", "", $line); |
---|
326 | $this->tpl_javascript = "list = new Array($line);"; |
---|
327 | $color = DISABLED_RGB; |
---|
328 | $this->tpl_onload.= "fnListCheck(list); fnCheckAllStockLimit('$max', '$color');"; |
---|
329 | |
---|
330 | return $arrList; |
---|
331 | } |
---|
332 | |
---|
333 | /* 規格の登録 */ |
---|
334 | function lfInsertProductClass($arrList, $product_id) { |
---|
335 | $objQuery = new SC_Query(); |
---|
336 | |
---|
337 | $objQuery->begin(); |
---|
338 | |
---|
339 | // 既存規格の削除 |
---|
340 | $where = "product_id = ?"; |
---|
341 | $objQuery->delete("dtb_products_class", $where, array($product_id)); |
---|
342 | |
---|
343 | $cnt = 1; |
---|
344 | // すべての規格を登録する。 |
---|
345 | while($arrList["classcategory_id1:".$cnt] != "") { |
---|
346 | if($arrList["check:".$cnt] == 1) { |
---|
347 | $sqlval['product_id'] = $product_id; |
---|
348 | $sqlval['classcategory_id1'] = $arrList["classcategory_id1:".$cnt]; |
---|
349 | $sqlval['classcategory_id2'] = $arrList["classcategory_id2:".$cnt]; |
---|
350 | if( strlen($arrList["product_class_id:".$cnt]) > 0 ){ |
---|
351 | $sqlval['product_class_id'] = $arrList["product_class_id:".$cnt]; |
---|
352 | } |
---|
353 | $sqlval['product_code'] = $arrList["product_code:".$cnt]; |
---|
354 | $sqlval['stock'] = $arrList["stock:".$cnt]; |
---|
355 | $sqlval['stock_unlimited'] = $arrList["stock_unlimited:".$cnt]; |
---|
356 | $sqlval['price01'] = $arrList['price01:'.$cnt]; |
---|
357 | $sqlval['price02'] = $arrList['price02:'.$cnt]; |
---|
358 | $sqlval['creator_id'] = $_SESSION['member_id']; |
---|
359 | $sqlval['create_date'] = "now()"; |
---|
360 | $sqlval['update_date'] = "now()"; |
---|
361 | // INSERTの実行 |
---|
362 | $objQuery->insert("dtb_products_class", $sqlval); |
---|
363 | } |
---|
364 | $cnt++; |
---|
365 | } |
---|
366 | |
---|
367 | $objQuery->commit(); |
---|
368 | } |
---|
369 | |
---|
370 | // 規格選択エラーチェック |
---|
371 | function lfClassError() { |
---|
372 | $objErr = new SC_CheckError(); |
---|
373 | $objErr->doFunc(array("規格1", "select_class_id1"), array("EXIST_CHECK")); |
---|
374 | $objErr->doFunc(array("規格", "select_class_id1", "select_class_id2"), array("TOP_EXIST_CHECK")); |
---|
375 | $objErr->doFunc(array("規格1", "規格2", "select_class_id1", "select_class_id2"), array("DIFFERENT_CHECK")); |
---|
376 | return $objErr->arrErr; |
---|
377 | } |
---|
378 | |
---|
379 | /* 取得文字列の変換 */ |
---|
380 | function lfConvertParam($array) { |
---|
381 | /* |
---|
382 | * 文字列の変換 |
---|
383 | * K : 「半角(ハンカク)片仮名」を「全角片仮名」に変換 |
---|
384 | * C : 「全角ひら仮名」を「全角かた仮名」に変換 |
---|
385 | * V : 濁点付きの文字を一文字に変換。"K","H"と共に使用します |
---|
386 | * n : 「全角」数字を「半角(ハンカク)」に変換 |
---|
387 | */ |
---|
388 | |
---|
389 | $no = 1; // FIXME 未定義変数の修正 |
---|
390 | while($array["classcategory_id1:".$no] != "") { |
---|
391 | $arrConvList["product_code:".$no] = "KVa"; |
---|
392 | $arrConvList["price01:".$no] = "n"; |
---|
393 | $arrConvList["price02:".$no] = "n"; |
---|
394 | $arrConvList["stock:".$no] = "n"; |
---|
395 | $no++; |
---|
396 | } |
---|
397 | |
---|
398 | // 文字変換 |
---|
399 | foreach ($arrConvList as $key => $val) { |
---|
400 | // POSTされてきた値のみ変換する。 |
---|
401 | if(isset($array[$key])) { |
---|
402 | $array[$key] = mb_convert_kana($array[$key] ,$val); |
---|
403 | } |
---|
404 | } |
---|
405 | return $array; |
---|
406 | } |
---|
407 | |
---|
408 | // 商品規格エラーチェック |
---|
409 | function lfProductClassError($array) { |
---|
410 | $objErr = new SC_CheckError($array); |
---|
411 | $no = 1; // FIXME 未定義変数の修正 |
---|
412 | while($array["classcategory_id1:".$no] != "") { |
---|
413 | if($array["check:".$no] == 1) { |
---|
414 | $objErr->doFunc(array("商品コード", "product_code:".$no, STEXT_LEN), array("MAX_LENGTH_CHECK")); |
---|
415 | $objErr->doFunc(array(NORMAL_PRICE_TITLE, "price01:".$no, PRICE_LEN), array("ZERO_CHECK", "NUM_CHECK", "MAX_LENGTH_CHECK")); |
---|
416 | $objErr->doFunc(array(SALE_PRICE_TITLE, "price02:".$no, PRICE_LEN), array("EXIST_CHECK", "ZERO_CHECK", "NUM_CHECK", "MAX_LENGTH_CHECK")); |
---|
417 | |
---|
418 | if($array["stock_unlimited:".$no] != '1') { |
---|
419 | $objErr->doFunc(array("在庫数", "stock:".$no, AMOUNT_LEN), array("EXIST_CHECK", "NUM_CHECK", "MAX_LENGTH_CHECK")); |
---|
420 | } |
---|
421 | } |
---|
422 | if(count($objErr->arrErr) > 0) { |
---|
423 | $objErr->arrErr["error:".$no] = $objErr->arrErr["product_code:".$no]; |
---|
424 | $objErr->arrErr["error:".$no].= $objErr->arrErr["price01:".$no]; |
---|
425 | $objErr->arrErr["error:".$no].= $objErr->arrErr["price02:".$no]; |
---|
426 | $objErr->arrErr["error:".$no].= $objErr->arrErr["stock:".$no]; |
---|
427 | } |
---|
428 | $no++; |
---|
429 | } |
---|
430 | return $objErr->arrErr; |
---|
431 | } |
---|
432 | |
---|
433 | /* 確認ページ表示用 */ |
---|
434 | function lfProductConfirmPage() { |
---|
435 | $objDb = new SC_Helper_DB_Ex(); |
---|
436 | $this->arrForm['mode'] = 'complete'; |
---|
437 | $this->arrClass = $objDb->sfGetIDValueList("dtb_class", 'class_id', 'name'); |
---|
438 | $cnt = 0; |
---|
439 | $check = 0; |
---|
440 | $no = 1; |
---|
441 | while($_POST["classcategory_id1:".$no] != "") { |
---|
442 | if($_POST["check:".$no] != "") { |
---|
443 | $check++; |
---|
444 | } |
---|
445 | $no++; |
---|
446 | $cnt++; |
---|
447 | } |
---|
448 | $this->tpl_check = $check; |
---|
449 | $this->tpl_count = $cnt; |
---|
450 | } |
---|
451 | } |
---|
452 | ?> |
---|