reg($appid,$password,$domain,$type,null,$owner,$name,$home,$present); alert('添加成功'); go('/admin/app.html'); }elseif($m=='del'){ if(empty($_GET['id']))sysmsg('应用ID不能为空'); $account=new \auth\appmaster(); $row=$account->del($_GET['id']); if(!$row) { alert('删除失败'); }else{ alert('删除成功'); } go('-1'); }elseif($m=='edit'){ if(empty($_POST))sysmsg('POST来的数据不能为空'); if(empty($_POST['name']))sysmsg('应用名称不能为空'); if(empty($_POST['home']))sysmsg('应用主页不能为空'); if(empty($_POST['domain']))sysmsg('授权回调域名不能为空'); if(empty($_POST['present']))sysmsg('应用介绍不能为空'); $appid=$_GET['id']; $name=$_POST['name']; $home=$_POST['home']; $domain=$_POST['domain']; $present=$_POST['present']; $account=new \auth\appmaster(); $account->edit($appid,$name,$home,$domain,$present); alert('修改成功'); go('-1'); }else{ alert('参数错误,请重新输入'); go('-1'); } admin_foot(); ?>