<?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      Your Name <mail@example.com>
 * @access      public
 */
class Admin_Itemmanage_Genrechange_Done
{

    var $title;
    var $pagename;
    var $div;

    var $db_item;
    var $upduser;
/*
    var $makercd;
    var $labelcd;
    var $maker_capi;
*/
    var $src_genre;
    var $src_title;
    
    var $itemcd;
    //var $genrelist;
    var $genre_select;
    var $genrecheck;

    var $nogenrelist;
    var $nogenrecheck;

    function execute()
    {
        $log =& LogFactory::getLog();
        $log->debug("Admin_Itemmanage_Rankchange_Doneが実行されました", "Admin_Itemmanage_Rankchange_Done#execute");


//        if (empty($this->genrelist)){
        if (empty($this->genre_select)){
    
            $this->nogenrelist = "no";
            return "error";
        }

        foreach($this->genrecheck as $key => $value){
            //$res = $this->db_item->updateGenreItem($this->itemcd[$key], $this->genrelist, $this->upduser);
            $res = $this->db_item->updateGenreItem($this->itemcd[$key], $this->genre_select, $this->upduser);
        }

        if (!res) return "error";

        if (empty($this->genrecheck)){
            $this->nogenrecheck = "no";
            return "error";
        }
        return 'success';
    }
}
?>
