<?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_Watch_List
{
    var $session;
    var $c_tag;
    var $c_watchlist;
    var $c_itembasic;
    var $auth;

    var $itemList;
    var $watchList;
    var $updcntList;
    var $mode;
    
    var $from;
	
    /**
     * [[機能説明]]
     *
     * @access  public
     */
    function execute()
    {
        $log =& LogFactory::getLog();
        $log->debug("Customer_Itemattribute_Taglistが実行されました", "Customer_Itemattribute_Taglist#execute");

        return 'success';
    }
    
    function getList()
    {
        
    	$watchdata = $this -> c_watchlist -> selectAll($this -> auth -> getAuthData("membercd"));
    		

	    //表示用データの組み立て
	    foreach ($watchdata as $row){
	        $list[$row['itemcd']][] = $row['tagnm'];
	        $this -> itemList[$row['itemcd']]  = $row['itemnm'];
	        $this -> watchList[$row['itemcd']]  = $row['watchlistcd'];
	        $this -> updcntList[$row['itemcd']]  = $row['updcnt'];
	    }
         

          return $list;
    }

    function getItemName($itemcd)
    {
        if (is_array($itemcd)) $itemcd = $itemcd['itemcd'];
        return $this -> itemList[$itemcd];
    } 
    
    function getWatchCd($itemcd)
    {
    	if (is_array($itemcd)) $itemcd = $itemcd['itemcd'];
    	return $this -> watchList[$itemcd];
    }
    
    function getUpdCnt($itemcd)
    {
        if (is_array($itemcd)) $itemcd = $itemcd['itemcd'];
        return $this -> updcntList[$itemcd];
    } 

}
?>
