<?php
/**
 * @copyright ONE/DEPO Project
 * @license   PHP License 3.01 <http://www.php.net/license/3_01.txt>
 */


/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */

/**
 * [[機能説明]]
 *
 * @package     [[package名]]
 * @author      H.Watanabe <hiroshi.watanabe@netnee.jp>
 * @access      public
 */
class Admin_Itemmanage_Genrechange_Search
{
    /**
     * [[機能説明]]
     *
     * @access  public
     */
    var $title;
    var $pagename;
    var $div;
    
    var $db_genre;
    /*
    var $maker_capi;
    var $makercd;
    var $labelcd;
    */
    var $genre_select;
    //var $src_genre;
    var $src_title;
    
    var $genre_list; //チェックボックスのジャンルリスト
    
    function execute()
    {
        $log =& LogFactory::getLog();
        $log->debug("Admin_Itemmanage_Genrechange_Searchが実行されました", "Admin_Itemmanage_Genrechange_Search#execute");
        
        $div = (empty($this->div)) ? 2 : 1;
        
        // ジャンルのチェックボックスにチェックつける
        /*
        $this->genre_list = $this->db_genre->selectAll($div);
        foreach ($this->src_genre as $src) {
            foreach ($this->genre_list as $key => $list) {
                if($src == $list['genrecd']) {
                    $this->genre_list[$key]['checked'] = 'checked';
                    break;
                }
            }
        }
        */
        return 'success';
    }
    
    // 検索フォームでのジャンル一覧取得
    function getGenreSearch() {
        $g = $this->db_genre->selectGenreRelationship();
        $c = "";
        $tree = array();
        $this->db_genre->makeTree($g, $c, $tree, false);

        return $tree;
    }
}
?>
