<?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_Tag_Delete
{
    var $c_tag;
    var $cd;
    var $auth;
    var $ssl;
    
    /**
     * [[機能説明]]
     *
     * @access  public
     */
    function execute()
    {
        $log =& LogFactory::getLog();
        $log->debug("Customer_Itemattribute_Tag_Deleteが実行されました", "Customer_Itemattribute_Tag_Delete#execute");

        $usercd = $this->auth->getAuthData("membercd");

        if (empty($usercd) || empty($this->cd)) {
            return 'failed';
        }
        if (!$this->c_tag->deleteItemTag($usercd,$this->cd)) {
            return 'failed';
        }

        $url  = ($this->ssl) ? SSL_URL_ROOT : URL_ROOT;
        $url .= htmlspecialchars($_SERVER["SCRIPT_NAME"], ENT_QUOTES);
        $url .= "?action=customer_itemattribute_taglist";
        header ("location:".$url);
    }
}
?>
