<?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.Delete.Check
 * @author      netnee <mail@example.com>
 * @access      public
 */
class Admin_Datamanage_Label_Delete_Check
{
    var $c_label;
    var $session;
    var $c_maker;
    
    var $makercd;
    var $code;
    var $name;
    var $kana;
    var $recdiv;
    var $updcnt;
    var $div;
    
    var $data;
    var $title;
    var $actionnm;
    var $pagename;
    
    var $from;      // 現在のページID

    var $srcword;            //検索値
    var $srcrecommenddiv;    //おすすめ区分

    var $srcdispnum;        // 表示件数

    function execute()
    {
        $this->data = $this->c_label->selectKey($this->makercd, $this->code);

        $postdata = array("makercd"=>$this->data["makercd"], "code"=>$this->code, "updcnt"=>$this->data["updcnt"]);
        $this->session->removeParameter("div");
        $this->session->setParameter("label", $postdata);

        if (!isset($this->name) && 
            !isset($this->kana) && 
            !isset($this->recdiv) && 
            !isset($this->updcnt)) {
            
            $this->name = $this->data["labelnm"];
            $this->kana = $this->data["labelnmkana"];
            $this->recdiv = $this->data["recommenddiv"];
            $this->updcnt = $this->data["updcnt"];
        }

        return 'success';
    }

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