<?php
/**
 * @copyright ONE/DEPO Project
 * @license   PHP License 3.01 <http://www.php.net/license/3_01.txt>
 */


//JSONを扱うためのパーサ
//require_once(WEBAPP_DIR."/JSON.php");

/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */

/**
 * [[機能説明]]
 *
 * @package     [[package名]]
 * @author      Your Name <mail@example.com>
 * @access      public
 */
class Customer_Itemattribute_Review_Deleteconfirm
{
//データベースから値をもらってくるためのID
    var $reviewcd;
//ランクとコメントの値
    var $rank;
    var $comment;
//表示用変数
    var $detail;
	var $session;
	var $c_review;

	var $auth;
	
    /**
     * [[機能説明]]
     *
     * @access  public
     */
    function execute()
    {
        $log =& LogFactory::getLog();
        $log->debug("Customer_Itemattribute_Review_Deleteconfirmが実行されました", "Customer_Itemattribute_Review_Deleteconfirm#execute");
        $this -> setDetail();
        return 'success';
    }

    function setDetail()
    {
    	//実際は、$array = $this -> c_review -> selectOne($this -> session -> getParameter('cart_items'), $this -> id);
    	$item = $this -> c_review -> selectOne($this->auth->getAuthData("membercd"), $this -> reviewcd);
        $this -> detail["reviewcd"]    = $item["reviewcd"];
        $this -> detail["itemnm"]      = $item["itemnm"];
        $this -> detail["itemcd"]      = $item["itemcd"];
        $this -> detail["year"]        = substr($item["createdate"], 0, 4);
        $this -> detail["month"]       = substr($item["createdate"], 5, 2);
        $this -> detail["day"]         = substr($item["createdate"], 8, 2);
        $this -> rank                  = $item["rankingrate"];
        $this -> comment               = $item["comment"];
        $this -> detail["updcnt"]      = $item["updcnt"];
    }    

    function getDetail()
    {
        return $this -> detail;
    }
    
    function getRank()
    {
        return $this -> rank;
    }
    
    function getComment()
    {
        return $this -> comment;
    }
}
?>
