<?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     Admin.Imguploader.Complete
 * @author      netnee <mail@example.com>
 * @access      public
 */
class Seller_Itemexhibit_Register_Image_Done
{
    var $view;
    
    var $imgtypedivlist;
    var $nmtypedivlist;
    var $title;
    var $pagename;
    
    var $select;
    var $keyword;
    var $itemnumber;
    var $jancode;
    
    var $sellercd;
    var $stockcd;
    var $lowprice;
    var $exhibitcount;
    
    var $imgtypediv;
    var $generalcd;
    var $generalsub;
    var $imgcd;
    var $imgintotitle;
    var $fromaction;
    
    
    var $mode;
   
    var $upduser;
    
    // マスタメンテ部関連
    var $srcword;
    var $srcrecommenddiv;
    var $srcdispnum;
    var $srccastdiv;
    var $from;

    var $sort;
    var $pageID;
    var $listsize;

    
    
    function execute()
    {
        $log =& LogFactory::getLog();
        $log->debug("Seller_Itemexhibit_Register_Image_Doneが実行されました", "Seller_Itemexhibit_Register_Image_Done#execute");
        
//        if (!empty($this->imgtypediv)){
//            // タイトル設定
//            $this->pagename = $this->nmtypedivlist[$this->imgtypediv - 1];
//        }


        //t_image へのDB登録
        if (!empty($this->mode)){
          $typediv = "2";
          $imgsizecd = "o";
          
          $res = $this->view->setUserItemImage($this->mode, $this->generalcd, $this->generalsub, $this->sellercd, $typediv, $imgsizecd, $this->upduser, $this->stockcd);


          $log->debug("debug : image failed", "Seller_Itemexhibit_Register_Image_Done#execute");
           if(!$res)return 'error';           
        }

        $this->imgcd = $this->generalcd . "-" . $this->generalsub . "-" . $this->sellercd . "-" . $this->stockcd; 

        $this->view->delWorkImage($this->imgcd);
        $this->view->delCacheImage($this->imgcd, $typediv);

        $log->debug("debug : success", "Seller_Itemexhibit_Register_Image_Done#execute");


        return 'success';
    }

}
?>
    