<?php
!defined('IN_ONEZ') && exit('Access Denied');
include_once(dirname(__FILE__).'/init.php');
$A['title']='设置收款账号';
if(defined('IS_POST')){
  $onez=array();
  foreach($payinfo as $v){
    $onez[$v['key']]=onez()->gp($v['key']);
  }
  $G['this']->data()->open('member')->update($onez,"id='$G[userid]'");
  $A['tip']='保存成功';
  $A['exit']='1';
  $A['token']='page';
  $A['action']=$this->action('cash');
  return;
}
$record[]=array(
  'type'=>'space',
  'subject'=>'请务必正确填写以下内容(微信与支付宝不能同时为空)',
);
foreach($payinfo as $v){
  $record[]=array(
    'type'=>'input',
    'label'=>$v['label'],
    'key'=>$v['key'],
    'hint'=>$v['hint']?$v['hint']:('请填写您的'.$v['label']),
    'notempty'=>$v['notempty'],
    'value'=>$G['user'][$v['key']],
  );
}
$record[]=array(
  'type'=>'space',
  'height'=>'5',
);
$record[]=array(
  'type'=>'button',
  'style'=>'2',
  'name'=>'确定',
  'token'=>'submit',
);

