<?php namespace Phpcmf\Controllers\Member;

class Home extends \Phpcmf\Member\Module
{

	// 商铺页面
	public function index() {

	    if (!$this->member or !in_array(MALL_SELL_GID, $this->member['groupid']) ) {
            $this->_msg(0, dr_lang('只有商家账号才能使用'));
        }

	    $id = $this->content_model->get_mall_id($this->uid);
        $id && $id == 'delete' && $this->_msg(0, dr_lang('店铺已经被删除，无法提供使用'));

        $id = intval($id);
	    if ($id > 0) {
	        $_GET['id'] = $id;
            $this->_Member_Edit();
        } elseif ($id < 0) {
	        $_GET['id'] = abs($id);
            $this->_Member_Verify_Edit();
        } else {
            $this->_Member_Add();
        }
	}

}
