<?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: */

require_once 'Pager.php';

/**
 * 出品登録-出品登録情報変更画面
 *
 * @package     Seller.Itemexhibit.Now.Input
 * @author      S.Oguma <shinichiro.oguma@netnee.jp>
 * @access      public
 */
class Seller_Itemexhibit_Now_Input
{
    var $view;
    var $auth;
    var $session;
    var $tname;

    var $bodyid;
    var $results;

    var $item;
    var $itemcd;
    var $mediacd;
    var $conditionno;
    var $condition;
    var $itemexp;
    var $curnum;
    var $exhibitcount;
    var $sellingprice;
    var $souryouprc;   // 送料
    var $stockcd;
    var $structcd;
    var $updcnt;

    var $title;

    var $actionChain;

    var $itemregist;
    var $itemregist_serial;

	var $sort;
	var $pageID;
	var $listsize;
    
    /**
     * Actionの実行
     *
     * @access  public
     */
    function execute()
    {
        $log =& LogFactory::getLog();
        $log->debug("Seller_Itemexhibit_Now_Inputが実行されました",
                    "Seller_Itemexhibit_Now_Input#execute");

        $this->session->setParameter("view", array("list"=> $this->list));
        $sess_view = $this->session->getParameter("view");

        if(!$this->itemregist)
        {
            $this->itemregist = new Data_Itemregist();
        }
        $this->itemregist->condition  = $this->conditionno;
        $this->itemregist->comment    = $this->itemexp;
        $this->itemregist->number     = $this->exhibitcount;
        $this->itemregist->price      = $this->sellingprice;
        $this->itemregist->shipping   = $this->souryouprc;
        //$log->debug("itemregist=".print_r($this->itemregist, true),
        //            "Seller_Itemexhibit_Now_Input#new Data_Itemregist()");

        $this->results = $this->view->getOneItem4ExhibitRow($this->itemcd, $this->structcd);
        //$log->debug("results=".print_r($this->results, true),
        //            "Seller_Itemexhibit_Now_Input#execute:getNewitemList()");

        return 'success';
    }
    
	function setItemregist(&$newmember)
	{
   		 $this -> itemregist =& $newmember;
	}

    function getItemregist()
	{
    	return $this -> itemregist;
	}
    
    function setItemregist_serial($value)
    {
        $value = urldecode($value);
        $this -> itemregist_serial = $value;
        $this -> itemregist = unserialize($value);
    }

    function getItemregist_serial()
    {
        return urlencode(serialize($this -> itemregist));
    }

    function getCondition()
    {
        return $this->tname->selectDivAll(9);
    }

}
?>
