<?php
defined('IN_IA') or exit('Access Denied');
global $_GPC, $_W;
$tmpl ="doweb/";
$settings = $this->module['config'];
// $sql = "SELECT * FROM" . tablename("evzg_express_shop") . "WHERE openid='{$_W['openid']}' AND 	uniacid='{$_W['uniacid']}'";
$sql = "SELECT * FROM" . tablename("evzg_express_shop")."WHERE uniacid='{$_W['uniacid']}' AND mobile='{$_GPC['name']}'";
$member = pdo_fetch($sql);
die();
// var_dump($member);
$op = ! empty($_GPC['op']) ? $_GPC['op'] : 'display';
if($op=='post'){
    $data['name'] = $_GPC['name'];
    $data['password'] = $_GPC['password'];
    if (empty($member)){
        message("用户名错误!请重新输入用户名。",mweb('login'),'error');
    }
    if(empty($data['password'])||($member['password']!=$data['password'])){
        message("密码错误！请重新输入密码。",mweb('login'),'error');
    }
        $_SESSION['sid'] = $member['id'];
        $_COOKIE['sid'] = $member['id'];
        message("登录成功！",mweb('index'),'success');
}
include $this->template($tmpl.'login');