source: branches/version-2_5-dev/data/class/pages/admin/products/LC_Page_Admin_Products_Category.php @ 20540

Revision 20540, 24.2 KB checked in by Seasoft, 13 years ago (diff)

#627(ソース整形・ソースコメントの改善)

  • 半SP
  • 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-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
25require_once CLASS_EX_REALDIR . 'page_extends/admin/LC_Page_Admin_Ex.php';
26require_once CLASS_EX_REALDIR . 'helper_extends/SC_Helper_CSV_Ex.php';
27
28/**
29 * カテゴリ管理 のページクラス.
30 *
31 * @package Page
32 * @author LOCKON CO.,LTD.
33 * @version $Id$
34 */
35class LC_Page_Admin_Products_Category extends LC_Page_Admin_Ex {
36
37    // {{{ properties
38
39    // }}}
40    // {{{ functions
41
42    /**
43     * Page を初期化する.
44     *
45     * @return void
46     */
47    function init() {
48        parent::init();
49        $this->tpl_subtitle = 'カテゴリー登録';
50        $this->tpl_mainpage = 'products/category.tpl';
51        $this->tpl_subnavi  = 'products/subnavi.tpl';
52        $this->tpl_mainno = 'products';
53        $this->tpl_subno  = 'category';
54        $this->tpl_onload = " fnSetFocus('category_name'); ";
55    }
56
57    /**
58     * Page のプロセス.
59     *
60     * @return void
61     */
62    function process() {
63        $this->action();
64        $this->sendResponse();
65    }
66
67    /**
68     * Page のアクション.
69     *
70     * @return void
71     */
72    function action() {
73        $objDb      = new SC_Helper_DB_Ex();
74        $objFormParam = new SC_FormParam_Ex();
75
76        // 入力パラメータ初期化
77        $this->initParam($objFormParam);
78        $objFormParam->setParam($_POST);
79        $objFormParam->convParam();
80
81        switch($this->getMode()) {
82        // カテゴリ登録/編集実行
83        case 'edit':
84            $category_id = $objFormParam->getValue('category_id');
85            if ($category_id == '') {
86                $this->doRegister($objFormParam);
87            } else {
88                $this->doEdit($objFormParam);
89            }
90            break;
91        // 入力ボックスへ編集対象のカテゴリ名をセット
92        case 'pre_edit':
93            $this->doPreEdit($objFormParam);
94            break;
95        // カテゴリ削除
96        case 'delete':
97            $this->doDelete($objFormParam, $objDb);
98            break;
99        // 表示順を上へ
100        case 'up':
101            $this->doUp($objFormParam);
102            break;
103        // 表示順を下へ
104        case 'down':
105            $this->doDown($objFormParam);
106            break;
107        // XXX 使われていないコード?
108        case 'moveByDnD':
109            // DnDしたカテゴリと移動先のセットを分解する
110            $keys = explode("-", $_POST['keySet']);
111            if ($keys[0] && $keys[1]) {
112                $objQuery = new SC_Query_Ex();
113                $objQuery->begin();
114
115                // 移動したデータのrank、level、parent_category_idを取得
116                $rank   = $objQuery->get('rank', "dtb_category", "category_id = ?", array($keys[0]));
117                $level  = $objQuery->get('level', "dtb_category", "category_id = ?", array($keys[0]));
118                $parent = $objQuery->get("parent_category_id", "dtb_category", "category_id = ?", array($keys[0]));
119
120                // 同一level内のrank配列を作成
121                $objQuery->setOption("ORDER BY rank DESC");
122                if ($level == 1) {
123                    // 第1階層の時
124                    $arrRet = $objQuery->select('rank', "dtb_category", "level = ?", array($level));
125                } else {
126                    // 第2階層以下の時
127                    $arrRet = $objQuery->select('rank', "dtb_category", "level = ? AND parent_category_id = ?", array($level, $parent));
128                }
129                for ($i = 0; $i < sizeof($arrRet); $i++) {
130                    $rankAry[$i + 1] = $arrRet[$i]['rank'];
131                }
132
133                // 移動したデータのグループ内データ数
134                $my_count = $this->lfCountChilds($objQuery, "dtb_category", "parent_category_id", "category_id", $keys[0]);
135                if ($rankAry[$keys[1]] > $rank) {
136                    // データが今の位置より上がった時
137                    $up_count = $rankAry[$keys[1]] - $rank;
138                    $decAry   = $objQuery->select("category_id", "dtb_category", "level = ? AND rank > ? AND rank <= ?", array($level, $rank, $rankAry[$keys[1]]));
139                    foreach($decAry as $value){
140                        // 上のグループから減算
141                        $this->lfDownRankChilds($objQuery, "dtb_category", "parent_category_id", "category_id", $value["category_id"], $my_count);
142                    }
143                    // 自分のグループに加算
144                    $this->lfUpRankChilds($objQuery, "dtb_category", "parent_category_id", "category_id", $keys[0], $up_count);
145                } else if($rankAry[$keys[1]] < $rank) {
146                    // データが今の位置より下がった時
147                    $down_count = 0;
148                    $incAry     = $objQuery->select("category_id", "dtb_category", "level = ? AND rank < ? AND rank >= ?", array($level, $rank, $rankAry[$keys[1]]));
149                    foreach ($incAry as $value) {
150                        // 下のグループに加算
151                        $this->lfUpRankChilds($objQuery, "dtb_category", "parent_category_id", "category_id", $value["category_id"], $my_count);
152                        // 合計減算値
153                        $down_count += $this->lfCountChilds($objQuery, "dtb_category", "parent_category_id", "category_id", $value["category_id"]);
154                    }
155                    // 自分のグループから減算
156                    $this->lfDownRankChilds($objQuery, "dtb_category", "parent_category_id", "category_id", $keys[0], $down_count);
157                }
158                $objQuery->commit();
159            }
160            break;
161        // カテゴリツリークリック時
162        case 'tree':
163            break;
164         // CSVダウンロード
165        case 'csv':
166            // CSVを送信する。正常終了の場合、終了。
167            $objCSV = new SC_Helper_CSV_Ex();
168            $objCSV->sfDownloadCategoryCsv() && exit;
169            break;
170        default:
171            break;
172        }
173
174        $parent_category_id = $objFormParam->getValue('parent_category_id');
175        // 空の場合は親カテゴリを0にする
176        if (empty($parent_category_id)) {
177            $parent_category_id = 0;
178        }
179        // 親カテゴリIDの保持
180        $this->arrForm['parent_category_id'] = $parent_category_id;
181        // カテゴリ一覧を取得
182        $this->arrList = $this->findCategoiesByParentCategoryId($parent_category_id);
183        // カテゴリツリーを取得
184        $this->arrTree = $objDb->sfGetCatTree($parent_category_id);
185        // ぱんくずの生成
186        $arrBread = array();
187        $objDb->findTree($this->arrTree, $parent_category_id, $arrBread);
188        $this->breadcrumbs = "ホーム" . $this->createBreaCrumbs($arrBread);
189    }
190
191    /**
192     * カテゴリの削除を実行する.
193     *
194     * 下記の場合は削除を実施せず、エラーメッセージを表示する.
195     *
196     * - 削除対象のカテゴリに、子カテゴリが1つ以上ある場合
197     * - 削除対象のカテゴリを、登録商品が使用している場合
198     *
199     * カテゴリの削除は、物理削除で行う.
200     *
201     * @param SC_FormParam $objFormParam
202     * @param SC_Helper_Db $objDb
203     * @return void
204     */
205    function doDelete(&$objFormParam, &$objDb) {
206        $category_id = $objFormParam->getValue('category_id');
207        $objQuery =& SC_Query_Ex::getSingletonInstance();
208
209        // 子カテゴリのチェック
210        $where = "parent_category_id = ? AND del_flg = 0";
211        $count = $objQuery->count("dtb_category", $where, array($category_id));
212        if ($count > 0) {
213             $this->arrErr['category_name'] = "※ 子カテゴリが存在するため削除できません。<br/>";
214             return;
215        }
216        // 登録商品のチェック
217        $table = "dtb_product_categories AS T1 LEFT JOIN dtb_products AS T2 ON T1.product_id = T2.product_id";
218        $where = "T1.category_id = ? AND T2.del_flg = 0";
219        $count = $objQuery->count($table, $where, array($category_id));
220        if ($count > 0) {
221            $this->arrErr['category_name'] = "※ カテゴリ内に商品が存在するため削除できません。<br/>";
222            return;
223        }
224
225        // ランク付きレコードの削除(※処理負荷を考慮してレコードごと削除する。)
226        $objDb->sfDeleteRankRecord("dtb_category", "category_id", $category_id, "", true);
227    }
228
229    /**
230     * 編集対象のカテゴリ名を, 入力ボックスへ表示する.
231     *
232     * @param SC_FormParam $objFormParam
233     * @return void
234     */
235    function doPreEdit(&$objFormParam) {
236        $category_id = $objFormParam->getValue('category_id');
237
238        $objQuery =& SC_Query_Ex::getSingletonInstance();
239
240        // 編集対象のカテゴリ名をDBより取得する
241        $where = "category_id = ?";
242        $category_name = $objQuery->get("category_name", "dtb_category", $where, array($category_id));
243
244        // 入力ボックスへカテゴリ名を保持する.
245        $this->arrForm['category_name'] = $category_name;
246        // カテゴリIDを保持する.
247        $this->arrForm['category_id']   = $category_id;
248    }
249
250    /**
251     * カテゴリの編集を実行する.
252     *
253     * 下記の場合は, 編集を実行せず、エラーメッセージを表示する
254     *
255     * - カテゴリ名がすでに使用されている場合
256     *
257     * @param SC_FormParam $objFormParam
258     * @return void
259     */
260    function doEdit(&$objFormParam) {
261        // 入力項目チェック
262        $arrErr = $objFormParam->checkError();
263        if (count($arrErr) > 0) {
264            $this->arrErr = $arrErr;
265            $this->arrForm['category_id']   = $objFormParam->getValue('category_id');
266            $this->arrForm['category_name'] = $objFormParam->getValue('category_name');
267            return;
268        }
269
270        // 重複チェック
271        $objQuery =& SC_Query_Ex::getSingletonInstance();
272        $where = "parent_category_id = ? AND category_id <> ? AND category_name = ?";
273        $count = $objQuery->count("dtb_category",
274                                  $where,
275                                  array($objFormParam->getValue('parent_category_id'),
276                                        $objFormParam->getValue('category_id'),
277                                        $objFormParam->getValue('category_name')));
278        if ($count > 0) {
279            $this->arrErr['category_name']  = "※ 既に同じ内容の登録が存在します。<br/>";
280            $this->arrForm['category_id']   = $objFormParam->getValue('category_id');
281            $this->arrForm['category_name'] = $objFormParam->getValue('category_name');
282            return;
283        }
284
285        // カテゴリ更新
286        $arrCategory = array();
287        $arrCategory['category_name'] = $objFormParam->getValue('category_name');
288        $arrCategory['update_date']   = 'NOW()';
289        $this->updateCategory($objFormParam->getValue('category_id'), $arrCategory);
290    }
291
292    /**
293     * カテゴリの登録を実行する.
294     *
295     * 下記の場合は, 登録を実行せず、エラーメッセージを表示する
296     *
297     * - カテゴリ登録数の上限を超える場合
298     * - 階層登録数の上限を超える場合
299     * - カテゴリ名がすでに使用されている場合
300     *
301     * @param SC_FormParam $objFormParam
302     * @return void
303     */
304    function doRegister(&$objFormParam) {
305        // 入力項目チェック
306        $arrErr = $objFormParam->checkError();
307        if (count($arrErr) > 0) {
308            $this->arrErr = $arrErr;
309            $this->arrForm['category_name'] = $objFormParam->getValue('category_name');
310            return;
311        }
312
313        // 登録数上限チェック
314        $objQuery =& SC_Query_Ex::getSingletonInstance();
315        $where = "del_flg = 0";
316        $count = $objQuery->count("dtb_category", $where);
317        if ($count >= CATEGORY_MAX) {
318            $this->arrErr['category_name']  = "※ カテゴリの登録最大数を超えました。<br/>";
319            $this->arrForm['category_name'] = $objFormParam->getValue('category_name');
320            return;
321        }
322
323        // 階層上限チェック
324        if ($this->isOverLevel($objFormParam->getValue('parent_category_id'))) {
325            $this->arrErr['category_name']  = "※ " . LEVEL_MAX . "階層以上の登録はできません。<br/>";
326            $this->arrForm['category_name'] = $objFormParam->getValue('category_name');
327            return;
328        }
329
330        // 重複チェック
331        $where = "parent_category_id = ? AND category_name = ?";
332        $count = $objQuery->count("dtb_category",
333                                  $where,
334                                  array($objFormParam->getValue('parent_category_id'),
335                                        $objFormParam->getValue('category_name')));
336        if ($count > 0) {
337            $this->arrErr['category_name']  = "※ 既に同じ内容の登録が存在します。<br/>";
338            $this->arrForm['category_name'] = $objFormParam->getValue('category_name');
339            return;
340        }
341
342        // カテゴリ登録
343        $this->registerCategory($objFormParam->getValue('parent_category_id'),
344                                $objFormParam->getValue('category_name'),
345                                $_SESSION['member_id']);
346    }
347
348    /**
349     * カテゴリの表示順序を上へ移動する.
350     *
351     * @param SC_FormParam $objFormParam
352     * @return void
353     */
354    function doUp(&$objFormParam) {
355        $category_id = $objFormParam->getValue('category_id');
356
357        $objQuery =& SC_Query_Ex::getSingletonInstance();
358        $objQuery->begin();
359        $up_id = $this->lfGetUpRankID($objQuery, "dtb_category", "parent_category_id", "category_id", $category_id);
360        if ($up_id != "") {
361            // 上のグループのrankから減算する数
362            $my_count = $this->lfCountChilds($objQuery, "dtb_category", "parent_category_id", "category_id", $category_id);
363                // 自分のグループのrankに加算する数
364                $up_count = $this->lfCountChilds($objQuery, "dtb_category", "parent_category_id", "category_id", $up_id);
365                if ($my_count > 0 && $up_count > 0) {
366                    // 自分のグループに加算
367                    $this->lfUpRankChilds($objQuery, "dtb_category", "parent_category_id", "category_id", $category_id, $up_count);
368                    // 上のグループから減算
369                    $this->lfDownRankChilds($objQuery, "dtb_category", "parent_category_id", "category_id", $up_id, $my_count);
370                }
371        }
372        $objQuery->commit();
373    }
374
375    /**
376     * カテゴリの表示順序を下へ移動する.
377     *
378     * @param SC_FormParam $objFormParam
379     * @return void
380     */
381    function doDown(&$objFormParam) {
382        $category_id = $objFormParam->getValue('category_id');
383
384        $objQuery =& SC_Query_Ex::getSingletonInstance();
385        $objQuery->begin();
386        $down_id = $this->lfGetDownRankID($objQuery, "dtb_category", "parent_category_id", "category_id", $category_id);
387        if ($down_id != "") {
388            // 下のグループのrankに加算する数
389            $my_count = $this->lfCountChilds($objQuery, "dtb_category", "parent_category_id", "category_id", $category_id);
390            // 自分のグループのrankから減算する数
391            $down_count = $this->lfCountChilds($objQuery, "dtb_category", "parent_category_id", "category_id", $down_id);
392            if ($my_count > 0 && $down_count > 0) {
393                // 自分のグループから減算
394                $this->lfUpRankChilds($objQuery, "dtb_category", "parent_category_id", "category_id", $down_id, $my_count);
395                // 下のグループに加算
396                $this->lfDownRankChilds($objQuery, "dtb_category", "parent_category_id", "category_id", $category_id, $down_count);
397            }
398        }
399        $objQuery->commit();
400    }
401
402    /**
403     * パラメータの初期化を行う
404     *
405     * @param SC_FormParam $objFormParam
406     * @return void
407     */
408    function initParam(&$objFormParam) {
409        $objFormParam->addParam("親カテゴリID", "parent_category_id", null, null, array());
410        $objFormParam->addParam("カテゴリID", "category_id", null, null, array());
411        $objFormParam->addParam("カテゴリ名", "category_name", STEXT_LEN, 'KVa', array("EXIST_CHECK", "SPTAB_CHECK", "MAX_LENGTH_CHECK"));
412    }
413
414    /**
415     * ぱんくず文字列を生成する.
416     *
417     * @param array $arrBread カテゴリ配列
418     * @return string ぱんくず文字列
419     */
420    function createBreaCrumbs($arrBread) {
421        $breadcrumbs = '';
422        // TODO JSON で投げて, フロント側で処理した方が良い?
423        $count = count($arrBread) - 1;
424        for ($i = $count; $i >= 0; $i--) {
425            // フロント側で &gt; へエスケープするため, ここでは > を使用
426            if ($i === $count) {
427                $breadcrumbs .= ' > ';
428            }
429            $breadcrumbs .= $arrBread[$i]['category_name'];
430            if ($i > 0) {
431                $breadcrumbs .= ' > ';
432            }
433        }
434        return $breadcrumbs;
435    }
436
437    /**
438     * 親カテゴリIDでカテゴリを検索する.
439     *
440     * - 表示順の降順でソートする
441     * - 有効なカテゴリを返す(del_flag = 0)
442     *
443     * @param SC_Query $objQuery
444     * @param int $parent_category_id 親カテゴリID
445     * @return array カテゴリの配列
446     */
447    function findCategoiesByParentCategoryId($parent_category_id) {
448        if (!$parent_category_id) {
449            $parent_category_id = 0;
450        }
451        $objQuery =& SC_Query_Ex::getSingletonInstance();
452        $col   = "category_id, category_name, level, rank";
453        $where = "del_flg = 0 AND parent_category_id = ?";
454        $objQuery->setOption("ORDER BY rank DESC");
455        return $objQuery->select($col, "dtb_category", $where, array($parent_category_id));
456    }
457
458    /**
459     * カテゴリを更新する
460     *
461     * @param integer $category_id 更新対象のカテゴリID
462     * @param array 更新する カラム名 => 値 の連想配列
463     * @return void
464     */
465    function updateCategory($category_id, $arrCategory) {
466        $objQuery =& SC_Query_Ex::getSingletonInstance();
467        $objQuery->begin();
468        $where = "category_id = ?";
469        $objQuery->update("dtb_category", $arrCategory, $where, array($category_id));
470        $objQuery->commit();
471    }
472
473    /**
474     * カテゴリを登録する
475     *
476     * @param integer 親カテゴリID
477     * @param string カテゴリ名
478     * @param integer 作成者のID
479     * @return void
480     */
481    function registerCategory($parent_category_id, $category_name, $creator_id) {
482        $objQuery =& SC_Query_Ex::getSingletonInstance();
483        $objQuery->begin();
484
485        $rank = null;
486        if ($parent_category_id == 0) {
487            // ROOT階層で最大のランクを取得する。
488            $where = "parent_category_id = ?";
489            $rank = $objQuery->max('rank', "dtb_category", $where, array($parent_category_id)) + 1;
490        } else {
491            // 親のランクを自分のランクとする。
492            $where = "category_id = ?";
493            $rank = $objQuery->get('rank', "dtb_category", $where, array($parent_category_id));
494            // 追加レコードのランク以上のレコードを一つあげる。
495            $sqlup = "UPDATE dtb_category SET rank = (rank + 1) WHERE rank >= ?";
496            $objQuery->exec($sqlup, array($rank));
497        }
498
499        $where = "category_id = ?";
500        // 自分のレベルを取得する(親のレベル + 1)
501        $level = $objQuery->get('level', "dtb_category", $where, array($parent_category_id)) + 1;
502
503        $arrCategory = array();
504        $arrCategory['category_name'] = $category_name;
505        $arrCategory['parent_category_id'] = $parent_category_id;
506        $arrCategory['create_date'] = "Now()";
507        $arrCategory['update_date'] = "Now()";
508        $arrCategory['creator_id']  = $creator_id;
509        $arrCategory['rank']        = $rank;
510        $arrCategory['level']       = $level;
511        $arrCategory['category_id'] = $objQuery->nextVal('dtb_category_category_id');
512        $objQuery->insert("dtb_category", $arrCategory);
513
514        $objQuery->commit();    // トランザクションの終了
515    }
516
517    /**
518     * カテゴリの階層が上限を超えているかを判定する
519     *
520     * @param integer 親カテゴリID
521     * @param 超えている場合 true
522     */
523    function isOverLevel($parent_category_id) {
524        $objQuery =& SC_Query_Ex::getSingletonInstance();
525        $level = $objQuery->get('level', "dtb_category", "category_id = ?", array($parent_category_id));
526        return $level >= LEVEL_MAX;
527    }
528
529    /**
530     * デストラクタ.
531     *
532     * @return void
533     */
534    function destroy() {
535        parent::destroy();
536    }
537
538    // 並びが1つ下のIDを取得する。
539    function lfGetDownRankID($objQuery, $table, $pid_name, $id_name, $id) {
540        // 親IDを取得する。
541        $col = "$pid_name";
542        $where = "$id_name = ?";
543        $pid = $objQuery->get($col, $table, $where, $id);
544        // すべての子を取得する。
545        $col = "$id_name";
546        $where = "del_flg = 0 AND $pid_name = ? ORDER BY rank DESC";
547        $arrRet = $objQuery->select($col, $table, $where, array($pid));
548        $max = count($arrRet);
549        $down_id = "";
550        for($cnt = 0; $cnt < $max; $cnt++) {
551            if($arrRet[$cnt][$id_name] == $id) {
552                $down_id = $arrRet[($cnt + 1)][$id_name];
553                break;
554            }
555        }
556        return $down_id;
557    }
558
559    // 並びが1つ上のIDを取得する。
560    function lfGetUpRankID($objQuery, $table, $pid_name, $id_name, $id) {
561        // 親IDを取得する。
562        $col = "$pid_name";
563        $where = "$id_name = ?";
564        $pid = $objQuery->get($col, $table, $where, $id);
565        // すべての子を取得する。
566        $col = "$id_name";
567        $where = "del_flg = 0 AND $pid_name = ? ORDER BY rank DESC";
568        $arrRet = $objQuery->select($col, $table, $where, array($pid));
569        $max = count($arrRet);
570        $up_id = "";
571        for($cnt = 0; $cnt < $max; $cnt++) {
572            if($arrRet[$cnt][$id_name] == $id) {
573                $up_id = $arrRet[($cnt - 1)][$id_name];
574                break;
575            }
576        }
577        return $up_id;
578    }
579
580    function lfCountChilds($objQuery, $table, $pid_name, $id_name, $id) {
581        $objDb = new SC_Helper_DB_Ex();
582        // 子ID一覧を取得
583        $arrRet = $objDb->sfGetChildrenArray($table, $pid_name, $id_name, $id);
584        return count($arrRet);
585    }
586
587    function lfUpRankChilds($objQuery, $table, $pid_name, $id_name, $id, $count) {
588        $objDb = new SC_Helper_DB_Ex();
589        // 子ID一覧を取得
590        $arrRet = $objDb->sfGetChildrenArray($table, $pid_name, $id_name, $id);
591        $line = SC_Utils_Ex::sfGetCommaList($arrRet);
592        $sql = "UPDATE $table SET rank = (rank + $count) WHERE $id_name IN ($line) ";
593        $sql.= "AND del_flg = 0";
594        $ret = $objQuery->exec($sql);
595        return $ret;
596    }
597
598    function lfDownRankChilds($objQuery, $table, $pid_name, $id_name, $id, $count) {
599        $objDb = new SC_Helper_DB_Ex();
600        // 子ID一覧を取得
601        $arrRet = $objDb->sfGetChildrenArray($table, $pid_name, $id_name, $id);
602        $line = SC_Utils_Ex::sfGetCommaList($arrRet);
603        $sql = "UPDATE $table SET rank = (rank - $count) WHERE $id_name IN ($line) ";
604        $sql.= "AND del_flg = 0";
605        $ret = $objQuery->exec($sql);
606        return $ret;
607    }
608}
Note: See TracBrowser for help on using the repository browser.