<?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.Form
 * @author      netnee <mail@example.com>
 * @access      public
 */
class Admin_Datamanage_Label_Insert_Form
{
    var $c_label;
    var $session;
    var $c_maker;
    var $div;
    
    var $makercd;
    var $code;
    var $name;
    var $kana;
    var $recdiv;

    var $title;
    var $actionnm;
    var $pagename;

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

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

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

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

        return 'success';
    }
    
    // メーカ全件取得
    function getMakeroptions()
    {
        $div = (empty($this->div)) ? 2 : 1;
        return $this->c_maker->selectAllAtDiv($div);
    }
    
    // メーカ名取得
    function getMakernm()
    {
        if (!empty($this->frommakerlist)){
            $maker = $this->c_maker->selectKey($this->frommakerlist);
            return $maker["makernm"];
        } else if(!empty($this->makercd)){
            $maker = $this->c_maker->selectKey($this->makercd);
            return $maker["makernm"];
        } else {
            return "";
        }
    }
}
?>
