<?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_Delete
{
    var $view;
    
    var $imgtypedivlist;
    var $nmtypedivlist;
    var $title;
    var $pagename;
    
    
    var $sellercd;
    var $stockcd;
    var $lowprice;
    var $exhibitcount;
    
    var $imgtypediv;
    var $generalcd;
    var $generalsub;
    var $imgcd;
    var $imgintotitle;
    var $fromaction;
    
    
    var $del;
   
    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_Deleteが実行されました", "Seller_Itemexhibit_Register_Image_Delete#execute");
        
        //t_image のデータ削除
        if (!empty($this->del)){
          $typediv = "2";
          $imgsizecd = "o";
          
          $res = $this->view->DeleteUserItemImage($this->del, $this->generalcd, $this->generalsub, $this->sellercd, $typediv, $imgsizecd, $this->upduser, $this->stockcd);


           if(!$res)return 'error';
        }

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

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


        return 'success';
    }

}
?>
    