<?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     Admin.Datamanage.Label.Insert.Check
 * @author      netnee <mail@example.com>
 * @access      public
 */
class Admin_Datamanage_Label_Insert_Check
{
    var $session;
    var $c_maker;
    
    var $makercd;
    var $name;
    var $kana;
    var $recdiv;
    var $div;
    
    var $title;
    var $actionnm;
    var $pagename;
    
    var $srcword;           // 検索値
    var $srcrecommenddiv;   // おすすめ区分

    var $srcdispnum;        // 表示件数
    var $from;              // 現在のページID

    var $frommakerlist;     // メーカー一覧からの遷移の際にメーカコードが入る

    function execute()
    {
        $postdata = array("makercd"=>$this->makercd,
                          "name"=>$this->name, 
                          "kana"=>$this->kana, 
                          "recdiv"=>$this->recdiv);
                          
        $this->session->removeParameter("label");
        $this->session->setParameter("label", $postdata);

        return 'success';
    }
    
    function getMakeroptions()
    {
         $div = (empty($this->div)) ? 2 : 1;
         return $this->c_maker->selectAllAtDiv($div);
    }

    function getMakernm()
    {
        if (empty($this->makercd)) return "";
        $maker = $this->c_maker->selectKey($this->makercd);
        return $maker["makernm"];
    }
}
?>
