<?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_Itembuy_Valuation_Done
{
//評価情報
    var $rank;
    var $comment;

//商品詳細情報　仮
    var $mode;
    var $page;
    var $no;

//テーブル
    var $c_list;
    var $c_valuation;

    var $auth;

    /**
     * [[機能説明]]
     *
     * @access  public
     */
    function execute()
    {
        $log =& LogFactory::getLog();
        $log->debug("Customer_Itembuy_Valuation_Doneが実行されました", "Customer_Itembuy_Valuation_Done#execute");
        $res = $this -> insert();
        if($res == false){
            return 'input';
        } else {
            return 'success';
        }
    }

    function insert()
    {
        $membercd = $this -> auth -> getAuthData("membercd");
        $sellercd = $this -> c_list -> getSellerInfo($this -> no);
        $res = $this -> c_valuation -> insert($this -> no, 
                                              $sellercd["sellercd"], 
                                              $membercd, 
                                              $this -> rank, 
                                              $this -> comment);
        return $res;
    }
}
?>
