<?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.Genre.Update.Form
 * @author      netnee T.Otogawa <tomokazu.otogawa@netnee.jp>
 * @access      public
 */
class Admin_Datamanage_Genre_Update_Form
{
    var $c_genre;

    var $code;
    var $name;
    var $dispsort;
    var $updcnt;
    var $pcd;
    var $data;

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

    var $v;
    var $srcword;       //検索値
    var $srcdispnum;    // 表示件数

    function execute()
    {
        $this->data = $this->c_genre->selectKey(NULL, $this->code);
        if (
            !isset($this->pcd) &&
            !isset($this->name) &&
            !isset($this->dispsort) &&
            !isset($this->updcnt)) 
        {
            $this->pcd = $this->data["parentcd"];
            $this->code = $this->data["genrecd"];
            $this->name = $this->data["genrenm"];
            $this->dispsort = $this->data["disppriority"];
            $this->updcnt = $this->data["updcnt"];
        }
        return 'success';
    }

    function setParentGenre() {
        return $this->c_genre->selectParentAll();
    }
}
?>
