Initial commit

This commit is contained in:
易焱
2021-04-18 18:51:51 +08:00
commit ec705f2fa8
3240 changed files with 623103 additions and 0 deletions
+86
View File
@@ -0,0 +1,86 @@
<include file="Inc:header"/>
<style>
label{ display: inline-block; margin-right: 10px;}
.power_list{ padding:10px;}
.power_list label{ height: 30px; line-height: 30px;}
.app_list .app_name{ line-height: 40px; height: 40px;background:#F5F5F5; }
.action_list{ margin-left: 30px; padding-left: 10px; padding-top: 5px; padding-bottom: 10px; margin-top: 5px; border: 1px solid #ececec; margin-bottom: 10px;}
.action_list .action_name label{ margin-bottom: 0px;}
.method_list{ padding-left: 50px;}
</style>
<div class="container-fluid">
<div class="row-fluid">
<div class="span12">
<div class="widget-box">
<div class="widget-title"> <span class="icon"> <i class="icon-align-justify"></i> </span>
<h5>{$pagetitle}</h5>
<span class="icon" style="float:right"> <a href="javascript:goback()"><i class=" icon-share-alt"></i></a></span>
</div>
<div class="widget-content nopadding">
<form id="basic_validate" class="form-horizontal" method="post" action="__SELF__" onsubmit="return save_form(this)">
<input type="hidden" name="role_id" value="{$role_id}">
<div class="power_list">
<foreach name="data" item="app" >
<div class="app_list">
<div class="app_name"><label><input type="checkbox" name="access[]" value="{$app.id}_1" onclick="check_this(this)" {$app['access']?'checked':''}/>{$app.title}</label></div>
<foreach name="app.child" item="action">
<div class="action_list">
<div class="action_name"><label><input type="checkbox" name="access[]" value="{$action.id}_2" onclick="check_this(this)" {$action['access']?'checked':''}/>{$action.title}</label></div>
<div class="method_list">
<foreach name="action.child" item="method">
<label><input type="checkbox" name="access[]" value="{$method.id}_3" {$method['access']?'checked':''}/>{$method.title}</label>
<?php
if($method[child]){
echo "(";
foreach($method[child] as $third){
?>
<label style="margin-right:0px;"/><input type="checkbox" name="access[]" value="{$third.id}_3" {$third['access']?'checked':''}>{$third.title}</label>
<?php
}
echo ")&nbsp&nbsp&nbsp&nbsp&nbsp";
}
?>
</foreach>
</div>
</div>
</foreach>
</div>
</foreach>
</div>
<div class="form-actions">
<button type="submit" class="btn btn-success form_submit">确定</button>
<button type="button" class="btn btn-danger" id="closeIframe" onclick="cancel()">取消</button>
<div id="status"></div>
</div>
<div id="submitted"></div>
</form>
</div>
</div>
</div>
</div>
</div>
<include file="Inc/footer"/>
<script language='javascript'>
function check_this(obj){
if($(obj).is(':checked')){
$(obj).parent().parent().parent().parent().parent().find("input[type='checkbox']").prop('checked',true);
$.uniform.update();
}else{
$(obj).parent().parent().parent().parent().parent().find("input[type='checkbox']").prop('checked',false);
$.uniform.update();
}
}
</script>
@@ -0,0 +1,86 @@
<include file="Inc:header"/>
<style>
label{ display: inline-block; margin-right: 10px;}
.power_list{ padding:10px;}
.power_list label{ height: 30px; line-height: 30px;}
.app_list .app_name{ line-height: 40px; height: 40px;background:#F5F5F5; }
.action_list{ margin-left: 30px; padding-left: 10px; padding-top: 5px; padding-bottom: 10px; margin-top: 5px; border: 1px solid #ececec; margin-bottom: 10px;}
.action_list .action_name label{ margin-bottom: 0px;}
.method_list{ padding-left: 50px;}
</style>
<div class="container-fluid">
<div class="row-fluid">
<div class="span12">
<div class="widget-box">
<div class="widget-title"> <span class="icon"> <i class="icon-align-justify"></i> </span>
<h5>{$pagetitle}</h5>
<span class="icon" style="float:right"> <a href="javascript:goback()"><i class=" icon-share-alt"></i></a></span>
</div>
<div class="widget-content nopadding">
<form id="basic_validate" class="form-horizontal" method="post" action="__SELF__" onsubmit="return save_form(this)">
<input type="hidden" name="role_id" value="{$r.id}">
<table class="table table-bordered table-striped">
<thead>
<tr>
<th style="width:5%">catid</th>
<th style="width:10%">栏目名称</th>
<th style="text-align: left;width:30%">栏目关系</th>
<th style="width:6%;cursor:pointer;text-decoration: underline" class="thischeck_all" val="1" objname="info_view">查看权限</th>
<th style="width:6%;cursor:pointer;text-decoration: underline" class="thischeck_all" val="1" objname="info_add">增加权限</th>
<th style="width:6%;cursor:pointer;text-decoration: underline" class="thischeck_all" val="1" objname="info_editor">编辑权限</th>
<th style="width:6%;cursor:pointer;text-decoration: underline" class="thischeck_all" val="1" objname="info_delete">删除权限</th>
<th style="width:6%;cursor:pointer; text-decoration: underline" class="thischeck_all" val="1" objname="info_checked">审核权限</th>
</tr>
</thead>
<tbody>
<foreach name="catData" item="v" >
<tr>
<td style="text-align: center;">{$v.catid}</td>
<td>{$v.name}</td>
<td class="tab-title"><a href="{:caturl($v[catid])}" target="_blank">{$v.str}{$v.name}</a></td>
<td class="center"><input type="checkbox" name="info_view[]" value="{$v.catid}" {:strstr($r[info_view],'|'.$v[catid].'|')?'checked':''}/>{$method.title}</td>
<td class="center"><input type="checkbox" name="info_add[]" value="{$v.catid}" {:strstr($r[info_add],'|'.$v[catid].'|')?'checked':''}/>{$method.title}</td>
<td class="center"><input type="checkbox" name="info_editor[]" value="{$v.catid}" {:strstr($r[info_editor],'|'.$v[catid].'|')?'checked':''}/>{$method.title}</td>
<td class="center"><input type="checkbox" name="info_delete[]" value="{$v.catid}" {:strstr($r[info_delete],'|'.$v[catid].'|')?'checked':''}/>{$method.title}</td>
<td class="center"><input type="checkbox" name="info_checked[]" value="{$v.catid}" {:strstr($r[info_checked],'|'.$v[catid].'|')?'checked':''}/>{$method.title}</td>
</tr>
</foreach>
</tbody>
</table>
<div class="form-actions">
<button type="submit" class="btn btn-success form_submit">确定</button>
<button type="button" class="btn btn-danger" id="closeIframe" onclick="cancel()">取消</button>
<div id="status"></div>
</div>
<div id="submitted"></div>
</form>
</div>
</div>
</div>
</div>
</div>
<include file="Inc/footer"/>
<script language='javascript'>
$(function(){
$(".thischeck_all").click(function(){
var y=$(this).attr("val");
var objname=$(this).attr("objname");
if(y==0){
$.uniform.update($("input[name='"+objname+"[]']").prop("checked", false));
y=1;
}else if(y==1){
$.uniform.update($("input[name='"+objname+"[]']").prop("checked", true));
y=0;
}
$(this).attr("val",y);
})
})
</script>
+39
View File
@@ -0,0 +1,39 @@
<include file="Inc:head"/>
<div class="widget-box2" style="margin:0px;">
<div class="widget-content nopadding">
<form id="basic_validate" class="form-horizontal" method="post" action="__SELF__" onsubmit="return save_form2(this)">
<div class="control-group">
<label class="control-label">角色名称</label>
<div class="controls">
<input id="username" type="text" name="name" />
</div>
</div>
<div class="control-group">
<label class="control-label">角色描述</label>
<div class="controls">
<input id="password" type="text" name="remark" />
</div>
</div>
<div class="control-group">
<label class="control-label">是否启用</label>
<div class="controls">
<label class="label-radio"><input type="radio" name="status" value="1" checked=""/></label>
<label class="label-radio"><input type="radio" name="status" value="0" /></label>
</div>
</div>
<div class="form-actions">
<button type="submit" class="btn btn-success form_submit">确定</button>
<button type="button" class="btn btn-danger" id="closeIframe">取消</button>
<div id="status"></div>
</div>
<div id="submitted"></div>
</form>
</div>
</div>
<include file="Inc/foot"/>
+39
View File
@@ -0,0 +1,39 @@
<include file="Inc:head"/>
<div class="widget-box2" style="margin:0px;">
<div class="widget-content nopadding">
<form id="basic_validate" class="form-horizontal" method="post" action="__SELF__" onsubmit="return save_form2(this)">
<input type="hidden" name="id" value="{$r.id}">
<div class="control-group">
<label class="control-label">角色名称</label>
<div class="controls">
<input id="username" type="text" name="name" value="{$r.name}"/>
</div>
</div>
<div class="control-group">
<label class="control-label">角色描述</label>
<div class="controls">
<input id="password" type="text" name="remark" value="{$r.remark}"/>
</div>
</div>
<div class="control-group">
<label class="control-label">是否启用</label>
<div class="controls">
<label class="label-radio"><input type="radio" name="status" value="1" {$r[status]?"checked":""}/></label>
<label class="label-radio"><input type="radio" name="status" value="0" {$r[status]?"":"checked"}/></label>
</div>
</div>
<div class="form-actions">
<button type="submit" class="btn btn-success form_submit">确定</button>
<button type="button" class="btn btn-danger" id="closeIframe">取消</button>
<div id="status"></div>
</div>
<div id="submitted"></div>
</form>
</div>
</div>
<include file="Inc/foot"/>
+62
View File
@@ -0,0 +1,62 @@
<include file="Inc:header"/>
<div class="container-fluid">
<div class="main_head">
<div class="main_h1"><h1>{$pagetitle}</h1></div>
<div class="main_add">
<a class="btn btn-inverse iframe" href="{:U('add')}">增加角色</a>
</div>
</div>
<div style="text-align:right; float:right"></div>
<div class="row-fluid">
<div class="span12">
<div class="widget-box">
<div class="widget-content nopadding">
<table class="table table-striped">
<thead>
<tr>
<th width="10%">ID</th>
<th>用户组</th>
<th>描述</th>
<th>授权</th>
<th>状态</th>
<!-- <th>操作</th>-->
</tr>
</thead>
<tbody>
<foreach name="data" item="v" >
<tr>
<td style="text-align: center;">{$v.id}</td>
<td class="center tab-title"><a href="{:U('editor',array('id'=>$v[id]))}" class="iframe">{$v.name}</a></td>
<td class="center">{$v.remark}</td>
<td class="center tab-title">
<a href="{:U('access',array('role_id'=>$v[id]))}">访问授权</a> &nbsp;
<a href="{:U('access_cat',array('role_id'=>$v[id]))}">栏目授权</a>
</td>
<td class="center">
<if condition="$v.status eq 1 ">
<span class="label label-success">正常</span>
<else />
<span class="label">禁用</span>
</if>
</td>
<!-- <td class="center">-->
<!-- <a href="{:U("editor",array("id"=>$v[id]))}" class="btn btn-primary btn-mini iframe">修改</a>-->
<!-- <a href="{:U("del",array("id"=>$v[id]))}" class="btn btn-danger btn-mini ajax_del">删除</a>-->
<!-- </td>-->
</tr>
</foreach>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<include file="Inc/footer"/>