<?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      H.Watanabe <hiroshi.watanabe@netnee.jp>
 * @access      public
 */
class Admin_Itemmanage_Change_Struct_Delete_Form
{
    /**
     * [[機能説明]]
     *
     * @access  public
     */
    var $actionnm;
    var $view;
    var $itemupdate;
    var $dlitem;

    var $result;
    var $mediaradio;
    var $SaleformRadio;

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

    var $itemdiv;
    var $jancode;
    var $hinban;
    var $itemtitle;
    var $release_date_start;
    var $release_date_end;
    var $publish_date_start;
    var $publish_date_end;
    var $maker_capital;
    var $maker_name;
    var $media;
    var $cast;
    var $situation;
    var $photo_situation;
    var $publish_situation;
    var $sort;
    var $genre_select;


    var $cd;
    var $structcd;
    var $itemnm;
    var $variationnm;
    var $jancd;
    var $isbncd;
    var $makeritemcd;
    var $salestartdate;
    var $makerprice;
    var $orderclosedate;
    var $saleformcd;
    var $rectime;
    var $mediacd;
    var $struct_comment;
    var $item_struct_updcnt;

    var $option01;
    var $option02;
    var $option03;
    var $option04;
    var $option05;
    var $option06;
    var $option07;
    var $option08;
    var $option09;
    var $option10;

    var $download;

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

        $this->result = $this->view->getOneItemOneStruct();
        if (
            !isset($this->itemnm) &&
            !isset($this->variationnm) &&
            !isset($this->jancd) &&
            !isset($this->makeritemcd) &&
            !isset($this->salestartdate) &&
            !isset($this->makerprice) &&
            !isset($this->orderclosedate) &&
            !isset($this->struct_comment) &&
            !isset($this->item_struct_updcnt) &&
            !isset($this->option01) && !isset($this->option02) &&
            !isset($this->option03) && !isset($this->option04) &&
            !isset($this->option05) && !isset($this->option06) &&
            !isset($this->option07) && !isset($this->option08) &&
            !isset($this->option09) && !isset($this->option10))
        {

            $dl = $this->dlitem->getDownloadItem($this->result["itemcd"], $this->result["structcd"]);
            $this->download       = (empty($dl)) ? 0 : 1;

            $this->itemnm         = $this->result["itemnm"];
            $this->variationnm    = $this->result["variationnm"];
            $this->jancd          = $this->result["jancd"];
            $this->makeritemcd    = $this->result["makeritemcd"];
            $this->salestartdate  = $this->result["salestartdate"];
            $this->makerprice     = $this->result["makerprice"];
            $this->orderclosedate = $this->result["orderclosedate"];
            $this->struct_comment = $this->result["struct_comment"];
            $this->item_struct_updcnt = $this->result["item_struct_updcnt"];

            $this->option01       = $this->result["struct_option01"];
            $this->option02       = $this->result["struct_option02"];
            $this->option03       = $this->result["struct_option03"];
            $this->option04       = $this->result["struct_option04"];
            $this->option05       = $this->result["struct_option05"];
            $this->option06       = $this->result["struct_option06"];
            $this->option07       = $this->result["struct_option07"];
            $this->option08       = $this->result["struct_option08"];
            $this->option09       = $this->result["struct_option09"];
            $this->option10       = $this->result["struct_option10"];
        }

        return 'check_success';
    }
    function getOption() {
        return $this->itemupdate->getOptionList(200,300);
    }
}
?>
