} if ($_POST) { $type = $_POST['type']; $mobile_type = in_array('mobile', $type) ? '1' : '0'; $card_type = in_array('card', $type) ? '1' : '0'; $pay_password = $_POST['pay_password']; if (empty($pay_password)) { Session::Set('error', '支付密码不能为空。'); } if ($mobile_type == '1') { // check $mobile = $_POST['mobile']; $code = $_POST['code']; if ($card['code'] != $code) { Session::Set('error', '手机验证码填写不正确。'); } } if ($card_type == '1') { } $type = $mobile_type . $card_type; $update = array('type' => $type); $update['state'] = '10'; $update['card_no'] = MCard::createCardNo(); DB::Update('mcard', $card['id'], $update); Session::Set('notice', '恭喜您申请成功。'); redirect(WEB_ROOT . '/card/apply.php?step=3'); } } if ($step == 3) { } include template('card_apply');