<?php
!defined('IN_ONEZ') && exit('Access Denied');
include_once(dirname(__FILE__).'/init.php');

$G['title']='设置收款信息';

#初始化表单
$form=onez('admin')->widget('form')
  ->set('title',$G['title'])
  ->set('values',$G['user'])
;
#创建表单项
$form->add(array('type'=>'hidden','key'=>'action','value'=>'save'));
foreach($payinfo as $v){
  $form->add($v);
}

#处理提交
if($onez=$form->submit()){
  ob_clean();
  
  $G['this']->data()->open('member')->update($onez,"id='$G[userid]'");
  
  onez()->ok('操作成功','reload');
}
onez('admin')->header();
?>
<section class="content-header">
  <h1>
    <?=$G['title']?>
  </h1>
  <ol class="breadcrumb">
    <li>
      <a href="<?php echo onez()->href('/')?>">
        <i class="fa fa-dashboard">
        </i>
        管理首页
      </a>
    </li>
    <li class="active">
      <?=$G['title']?>
    </li>
  </ol>
</section>
<section class="content">
  <form id="form-common" method="post">
    <div class="box box-info">
      <div class="box-header with-border">
        <h3 class="box-title">
          <?=$G['title']?>
        </h3>
        <div class="box-tools pull-right">
        </div>
      </div>
      <div class="box-body">
        <?=$form->code()?>
      </div>
      <div class="box-footer clearfix">
        <button type="submit" class="btn btn-primary">
          确定修改
        </button>
      </div>
    </div>
    <input type="hidden" name="action" value="save" />
  </form>
</section>
<?php
echo $form->js();
onez('admin')->footer();
?>