<?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_Reviewlist
{
    var $session;
    var $c_review;
    var $auth;
    
    var $detail;
	
    /**
     * [[機能説明]]
     *
     * @access  public
     */
    function execute()
    {
        $log =& LogFactory::getLog();
        $log->debug("Customer_Itemattribute_Reviewlistが実行されました", "Customer_Itemattribute_Reviewlist#execute");
        $this -> set_detail();
        return 'success';
    }

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

            $count += 1;
        }
    }

    function get_detail()
    {
        return $this -> detail;
    }
}
?>
