<?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.Datamanage.Img.Done
 * @author      netnee <mail@example.com>
 * @access      public
 */
class Admin_Imguploader_Delete
{
    var $session;
    var $view;

    var $c;
    var $s;
    var $type;
    var $div;

    var $imgintotitle;
    var $fromaction;

    function execute()
    {
        $log =& LogFactory::getLog();
        $log->debug("Admin_Imguploader_Deleteが実行されました", "Admin_Imguploader_Delete#execute");

        $err = false;

        if (isset($this->c) && isset($this->s) && isset($this->type) && isset($this->div)) {
            $this->view->delCacheImage($this->c, $this->div);
            $this->view->delData($this->c, $this->s, $this->type, $this->div);
        }

        if ($err===true) return 'error';
        $loc = htmlspecialchars($_SERVER["SCRIPT_NAME"], ENT_QUOTES) ."?action=admin_imguploader_form".
               "&generalcd=". $this->c ."&generalsub=". $this->s ."&imgtypediv=". $this->div .
               "&imgintotitle=". $this->imgintotitle ."&fromaction=". $this->fromaction;
        header("location: ". $loc);
        exit;
    }

}
?>
