<?php
InitGP(array('uid','c'),'G');
$ot->save('users','uid',array(
    'date'=>array('infotime'),
    'b'=>$c,
  )
);

theme_header();
$ot->borderA('#content2','box2');
if(!$uid){
  $ot->addhead('添加新管理员');
  unset($username,$amt,$payamt,$lockamt,$credit,$ismaster,$email);
}else{
  !gettable('users',"uid='$uid'") && jump('error','您要编辑的管理员不存在','?a=users');
  $ot->addhead('编辑管理员');
}
$ot->addinput('用户名','username',$username,'text',1,'');
$ot->addinput('密码','password',$password,'password',!$uid,'',array('tip'=>$uid ? '不改请留空' : ''));
$ot->addinput('Email','email',$email,'text',1,'Email',array('msg'=>'请正确填写'));
if(!$uid){
  $ot->addinput('','infotime','0','hidden',1);
  $ot->addinput('','action','add','name');
  $ot->setform('添加');
}else{
  $ot->addinput('','action','edit','name');
  $ot->setform('保存');
}
$ot->borderB(1);
$ot->flush();
theme_footer();
?>