<?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 Customer_Itemattribute_Watch_Delete
{
    var $c_watch;
    var $cd;
    var $auth;
    var $ssl;
    var $updcnt;
    var $pagetype="削除";
    
    /**
     * [[讖溯�隱ｬ譏讃]
     *
     * @access  public
     */
    function execute()
    {
        $log =& LogFactory::getLog();

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

        if (empty($usercd) || empty($this->cd) || strlen($this->updcnt)<=0) {
            return 'failed';
        }
        if (!$this->c_watch->delete($this->cd,$usercd,$nm,$this->updcnt)) {
            return 'failed';
        }

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