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

/**
 * 棚番 ID リスト
 *
 * @package     Admin.Itemmanage.Rackid.List
 * @author      netnee <mail@example.com>
 * @access      public
 */
class Admin_Itemmanage_Rackid_List
{
    var $title;
    var $ins_title;
    var $upd_title;
    var $pagename;
    
    var $stock;
    
    var $jansearch;
    var $stocktitlecd;
    var $maxrackid;
    var $defaultid;
    
    var $itemc;
    var $structc;
    var $stockc;
    var $rackid;
    
    var $returndata = null;
    
    var $cd;
    var $structcd;
    var $stockcd;
    
    var $div;
    var $itemdiv;
    var $jancode;
    var $hinban;
    var $itemtitle;
    var $release_date_start;
    var $release_date_end;
    var $publish_date_start;
    var $publish_date_end;
    var $maker_capital;
    var $maker_name;
    var $media;
    var $cast;
    var $situation;
    var $photo_situation;
    var $publish_situation;
    var $sort;
    var $genre_select;
    
    /**
     * execute
     *
     * @access  public
     */
    function execute()
    {
        $log =& LogFactory::getLog();
        $log->debug("Admin_Itemmanage_Rackid_Listが実行されました", "Admin_Itemmanage_Rackid_List#execute");
        $this->title = $this->ins_title;
        
        $this->maxrackid = $this->stock->getMaxRackid();
        
        if (!empty($this->stocktitlecd)){
            // 棚番更新
            $this->returndata = $this->stock->getRackiddataBySTC($this->stocktitlecd);
            $this->title = $this->upd_title;
        } elseif (!empty($this->jansearch)) {
            // 棚番入力
            $this->returndata = $this->stock->getRackiddataByJan($this->jansearch);
            if( !is_array($this->returndata[0]) ) {
                //品番検索
                $this->returndata = $this->stock->getRackiddataByMIC($this->jansearch);
            }
        }
        
        
        return 'success';
    }
}
?>
