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

/**
 * [[機能説明]]
 *
 * @package     [[package名]]
 * @author      Your Name <mail@example.com>
 * @access      public
 */
class Admin_Usermanage_Valuation_List
{
    /**
     * [[機能説明]]
     *
     * @access  public
     */

    var $c_val;
    var $session;
    var $row;
    var $vallist;
    var $key;
    
    var $title;
    var $pagename;

	function getList()
	{
	    $res = $this->vallist;
	    return $res;
	}
	
	function outputList()
	{
	    
	    $this->row = $this->c_val->selectAll($this->key);
	    /*
	    //購入ユーザ名をコードから取得して新たに配列を組みなおす
	    $newlist = array();
	    $line    = 0;
	    foreach($this->row as $val){
	        $line        = $line + 1;
	        $tempnm      = $this->c_val->getConsumerName($val['consumermembercd']);
	        $consumernm  = $tempnm['lastnm'] . " " . $tempnm['firstnm'];
	        $tempnm2     = $this->c_val->getSellerName($val['membercd']);
	        $sellernm    = $tempnm2['lastnm'] . " " . $tempnm2['firstnm'];
	        $adddate     = substr(strval($val['adddate']),0,10);
	        $divideddate = explode("-",$adddate);
	        $newdate     = $divideddate[0] . "/" . $divideddate[1] . "/" . $divideddate[2];
	        $newval      = array("line"      => $line, 
	        					 "adddate"    => $newdate,
	        					 "valuation"  => $val['valuation'], 
	        					 "comment"    => $val['comment'],
	        					 "consumernm" => $consumernm, 
	        					 "sellernm"   => $sellernm,
	        					 "ordercd"    => $val['orderno'],
	        					 "ccd"        => $val['consumermembercd'], 
	        					 "scd"        => $val['membercd'],);
	        //組みなおした列を新たな配列の最後尾に追加
	        array_push($newlist,$newval);
	    }
	    $res = $newlist;
	    */
	    return $this->row;
	}
	
    function execute()
    {
        $this->vallist = $this->outputList();
        
        $log =& LogFactory::getLog();
        $log->debug("Admin_Usermanage_Valuation_Listが実行されました", "Admin_Usermanage_Valuation_List#execute");

        return 'success';
    }
}
?>