<?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_Mypage_Leave_Done
{
    var $auth;             //Authオブジェクトを取得
    var $memberCd;
    var $c_leave;          //登録削除用テーブル操作クラス
    var $title;

    /**
     * [[機能説明]]
     *
     * @access  public
     */
    function execute()
    {
        $log =& LogFactory::getLog();
        $log->debug("Customer_Mypage_Leave_Doneが実行されました", "Customer_Mypage_Leave_Done#execute");

        $this -> memberCd = $this -> auth -> getAuthData("membercd");
        $res = $this -> Delete_DB();
        if($res) {
            $this -> auth -> logout();
            return 'success';
        } else {
            return 'input';
        }
    }

    function Delete_DB()
    {
        $res = $this -> c_leave -> delete_member($this -> memberCd);
        if($res == false)
        {
            return false;
        }
        else
        {
            return true;
        }
    }

}
?>