55 lines
2.1 KiB
PHP
55 lines
2.1 KiB
PHP
<?php
|
|
|
|
use auth\scope;
|
|
|
|
include INDEX_ROOT.'admin/head.php';
|
|
admin_head('新增应用');
|
|
?>
|
|
<!-- content start -->
|
|
<div class="admin-content">
|
|
|
|
<div class="am-cf am-padding">
|
|
<div class="am-fl am-cf"><strong class="am-text-primary am-text-lg">权限点信息新建/编辑</strong></div>
|
|
</div>
|
|
<div class="am-tabs am-margin" data-am-tabs>
|
|
<ul class="am-tabs-nav am-nav am-nav-tabs">
|
|
<li class="am-active"><a href="#tab1">权限点</a></li>
|
|
</ul>
|
|
|
|
<div class="am-tabs-bd">
|
|
<div class="am-tab-panel am-fade am-in am-active" id="tab1">
|
|
<?php
|
|
$form=new amaze\form();
|
|
$scope_calss=new auth\scope();
|
|
if($_GET['m']=="edit"){
|
|
echo '<form class="am-form" method="post" action="/admin/scopesubmit.cgi?m=edit&scope='.$_GET['scope'].'">';
|
|
$form->text('权限点','scope','disabled value='.$_GET['scope']);
|
|
$form->text('介绍','name','required value='.$scope_calss->see($_GET['scope'])['name']);
|
|
$form->opition('是否默认');
|
|
$form->opition_body('def','1','是');
|
|
$form->opition_body('def','0','否');
|
|
$form->opition('end');
|
|
}else{
|
|
echo '<form class="am-form" method="post" action="/admin/scopesubmit.cgi?m=new">';
|
|
$form->text('权限点','scope','required');
|
|
$form->text('介绍','name','required');
|
|
$form->opition('是否默认');
|
|
$form->opition_body('def','1','是');
|
|
$form->opition_body('def','0','否');
|
|
$form->opition('end');
|
|
}
|
|
?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="am-margin">
|
|
<input type="submit" class="am-btn am-btn-primary am-btn-xs">
|
|
</div>
|
|
</form>
|
|
</div>
|
|
<!-- content end -->
|
|
|
|
<?php
|
|
admin_foot();
|
|
?>
|