<?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 Seller_Mypage
{
    var $c_mypage;
    var $c_seller;
    var $auth;

    var $status;

    /**
     * [[讖溯�隱ｬ譏讃]
     *
     * @access  public
     */
    function execute()
    {
        $log =& LogFactory::getLog();
        $log->debug("Customer_Mypage縺悟ｮ溯｡後＆繧後∪縺励◆", "Seller_Mypage#execute");
        
        //隱崎ｨｼ繝√ぉ繝�け
        if (!$this -> auth -> checkAuth()) return 'autherr';

        $this->status = $this -> c_mypage -> checkStatus($this -> auth -> getAuthData("membercd"));

        if (!$this->status["scd"]) {
            $location = SSL_URL_ROOT.
                        htmlspecialchars($_SERVER["SCRIPT_NAME"], ENT_QUOTES).
                        '?action=customer_mypage_seller_insert_form';
            header('location:'.$location);
        }
        return 'success';
    }

    function getStatus()
    {
        return $this->status;
    }
    
    function checkStopSeller()
    {
        $stop = $this->c_seller->checkItemExhibit( $this->auth->getAuthData("membercd") );
        return $stop[0];
    }
}
?>
