262 lines
13 KiB
PHP
262 lines
13 KiB
PHP
<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
|
||
<html lang="zh-cn">
|
||
<head>
|
||
<title>
|
||
<?php if($pagetitle): echo ($pagetitle); ?>-
|
||
<?php else: endif; ?>
|
||
<?php echo (C("CMS_NAME")); ?>
|
||
</title>
|
||
<meta charset="UTF-8"/>
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||
<link rel="stylesheet" href="/Public/Admin/css/bootstrap.min.css"/>
|
||
<link rel="stylesheet" href="/Public/Admin/css/bootstrap-responsive.min.css"/>
|
||
<link rel="stylesheet" href="/Public/Admin/css/uniform.css"/>
|
||
<link rel="stylesheet" href="/Public/Admin/css/colorpicker.css"/>
|
||
<link rel="stylesheet" href="/Public/Admin/css/datepicker.css"/>
|
||
<link rel="stylesheet" href="/Public/Admin/css/select2.css"/>
|
||
<link rel="stylesheet" href="/Public/Admin/css/layui.css"/>
|
||
<link rel="stylesheet" href="/Public/Admin/css/matrix-style.css"/>
|
||
<link rel="stylesheet" href="/Public/Admin/css/matrix-media.css"/>
|
||
<link href="/Public/Admin/font-awesome/css/font-awesome.css" rel="stylesheet"/>
|
||
<link href="/Public/Admin/css/global.css" rel="stylesheet"/>
|
||
<link href="/Public/Admin/css/formSelects-v4.css" rel="stylesheet"/>
|
||
<script>
|
||
var uparr = new Array();
|
||
uparr[0] = "<?php echo U('Update/updateModel');?>";
|
||
uparr[1] = "<?php echo U('Update/updateTemplate');?>";
|
||
uparr[2] = "<?php echo U('Update/updatePageTemplate');?>";
|
||
uparr[3] = "<?php echo U('Update/updateCatCache');?>";
|
||
uparr[4] = "<?php echo U('Update/updateModelCache');?>";
|
||
uparr[5] = "<?php echo U('Update/updateFeedbackModel');?>";
|
||
uparr[6] = "<?php echo U('Update/del_runtime');?>";
|
||
|
||
function updateCache() {
|
||
//初始化
|
||
var progress = '<div class="bakeing"><div class="progress progress-striped active"><div class="bar" id="database_bar" style="width:1%;">1%</div></div></div>';
|
||
$("body").append(progress);
|
||
$(".bakeing").show();
|
||
$("body").css("overflow", "hidden");
|
||
window.onbeforeunload = function () {
|
||
return "正在更新缓存,请不要关闭!"
|
||
}
|
||
//初始化成功,下面开始备份数据
|
||
updateCache_ajax(0);
|
||
}
|
||
|
||
function updateCache_ajax(i) {
|
||
//更新完成
|
||
if (i == uparr.length) {
|
||
window.onbeforeunload = function () {
|
||
return null
|
||
}
|
||
setTimeout(function () {
|
||
$(".bakeing").remove();
|
||
}, 1000);
|
||
} else {
|
||
$.get(uparr[i], function () {
|
||
var progress_percent = (i + 1) / uparr.length;
|
||
progress_percent = progress_percent * 100;
|
||
progress_percent = progress_percent.toFixed(2);
|
||
$("#database_bar").html(progress_percent + "%");
|
||
$("#database_bar").css("width", progress_percent + "%");
|
||
updateCache_ajax(i + 1);
|
||
}, "json")
|
||
}
|
||
|
||
}
|
||
</script>
|
||
</head>
|
||
<body>
|
||
<!--<div id="header">-->
|
||
<!-- <h1><a href="dashboard.html"><?php echo (C("setting.admin_site_name")); ?></a></h1>-->
|
||
<!--</div>-->
|
||
<div >
|
||
<h1 style="color: #ffffec;height:38px;font-size: 17px;line-height: 38px;margin-left: 30px;margin-top: 10px;width: 100%;">博纳精工</h1>
|
||
<h1 style="color: #ffffec;height:39px;font-size: 17px;line-height: 20px;margin-left: 15px;width: 100%;">质量管理系统</h1>
|
||
</div>
|
||
|
||
|
||
<div id="user-nav" class="navbar navbar-inverse">
|
||
<ul class="nav">
|
||
<li class="dropdown" id="profile-messages"><a title="" href="#" data-toggle="dropdown"
|
||
data-target="#profile-messages" class="dropdown-toggle"><i
|
||
class="icon icon-user"></i> <span class="text">我的</span><b class="caret"></b></a>
|
||
<ul class="dropdown-menu">
|
||
<li><a href="<?php echo U('Index/editorpass');?>" class="iframe"><i class="icon-user"></i> 密码修改</a></li>
|
||
<li class="divider"></li>
|
||
<li><a href="#" onclick="logout()"><i class="icon-key"></i>退出</a></li>
|
||
</ul>
|
||
</li>
|
||
|
||
<li class="dropdown"><a href=""><?php echo session("user_name");?></a></li>
|
||
|
||
|
||
</ul>
|
||
</div>
|
||
<?php
|
||
if(C('LANG_SWITCH_ON')){ ?>
|
||
<div id="search">
|
||
<div class="btn-group" style="margin-top:9px;">
|
||
<button data-toggle="dropdown" class="btn btn-success dropdown-toggle">
|
||
语言切换<?php echo $LANG_OPT[$admin_lang]?':'.$LANG_OPT[$admin_lang]:'';?> <span class="caret"></span></button>
|
||
<ul class="dropdown-menu">
|
||
<li><a href="<?php echo U('Index/setAdminLang',array('admin_lang'=>''));?>">不限</a></li>
|
||
<li class="divider"></li>
|
||
<?php if(is_array($LANG_OPT)): foreach($LANG_OPT as $key=>$v): ?><li><a href="<?php echo U('Index/setAdminLang',array('admin_lang'=>$key));?>"><?php echo ($v); ?></a></li>
|
||
<li class="divider"></li><?php endforeach; endif; ?>
|
||
</ul>
|
||
</div>
|
||
</div>
|
||
<?php
|
||
} ?>
|
||
|
||
|
||
<div id="sidebar"><a href="#" class="visible-phone"><i class="icon icon-home"></i> Dashboard</a>
|
||
<ul class="menu_list">
|
||
<!-- <li><a href="/index.php/Admin"><i class="icon icon-home"></i> <span>控制面板</span> <span-->
|
||
<!-- class="label label-important"></span></a></li>-->
|
||
<!-- <li class="submenu <?=menu_current('Info/index')||menu_current('Info/add')||menu_current('Info/editor')?" open-->
|
||
<!-- ":"" ?>"><a href="/index.php/Admin"><i class="icon icon-retweet"></i> <span>信息管理</span> <span-->
|
||
<!-- class="label label-important"></span></a>-->
|
||
<!-- <ul>-->
|
||
<!-- <?php if(is_array($modeldate)): foreach($modeldate as $key=>$v): ?>-->
|
||
<!-- <li class="<?=$v[catid]==$currentCatid?" active-->
|
||
<!-- ":"" ?>"><a-->
|
||
<!-- href="<?php echo U('Info/index',array('catid'=>$v[catid],'modelid'=>$v[modelid]));?>"><?php echo ($v["name"]); ?></a></li>-->
|
||
<!--<?php endforeach; endif; ?>-->
|
||
<!-- </ul>-->
|
||
<!-- </li>-->
|
||
<?php if(is_array($__MENU__)): foreach($__MENU__ as $key=>$v): ?><li class="<?=count($v[child])?" submenu
|
||
":"" ?> <?=menu_current($v)?"open ":"" ?>"><a href="<?=count($v[child])?" #":U($v[name]) ?>"><i
|
||
class="icon <?php echo ($v["icon"]); ?>"></i> <span><?php echo ($v["title"]); ?></span> <span class="label label-important"></span></a>
|
||
<ul>
|
||
<?php if(is_array($v["child"])): foreach($v["child"] as $key=>$vv): ?><li class="<?=menu_current($vv)?" active
|
||
":"" ?>"><a href="<?php echo (U($vv[name])); ?>"><?php echo ($vv["title"]); ?></a></li><?php endforeach; endif; ?>
|
||
</ul>
|
||
</li><?php endforeach; endif; ?>
|
||
|
||
</ul>
|
||
</div>
|
||
|
||
<div id="nav_content">
|
||
<div id="content-header">
|
||
<div id="breadcrumb"><?php echo admin_nav();?></div>
|
||
<div class="nav_notic" id="s1">
|
||
<ul><?php echo nav_notic();?></ul>
|
||
</div>
|
||
</div>
|
||
<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><?php echo ($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="/index.php?m=Admin&c=Role&a=access&role_id=4" onsubmit="return save_form(this)">
|
||
<input type="hidden" name="role_id" value="<?php echo ($role_id); ?>">
|
||
<div class="power_list">
|
||
<?php if(is_array($data)): foreach($data as $key=>$app): ?><div class="app_list">
|
||
<div class="app_name"><label><input type="checkbox" name="access[]" value="<?php echo ($app["id"]); ?>_1" onclick="check_this(this)" <?php echo ($app['access']?'checked':''); ?>/><?php echo ($app["title"]); ?></label></div>
|
||
<?php if(is_array($app["child"])): foreach($app["child"] as $key=>$action): ?><div class="action_list">
|
||
<div class="action_name"><label><input type="checkbox" name="access[]" value="<?php echo ($action["id"]); ?>_2" onclick="check_this(this)" <?php echo ($action['access']?'checked':''); ?>/><?php echo ($action["title"]); ?></label></div>
|
||
<div class="method_list">
|
||
<?php if(is_array($action["child"])): foreach($action["child"] as $key=>$method): ?><label><input type="checkbox" name="access[]" value="<?php echo ($method["id"]); ?>_3" <?php echo ($method['access']?'checked':''); ?>/><?php echo ($method["title"]); ?></label>
|
||
<?php
|
||
if($method[child]){ echo "("; foreach($method[child] as $third){ ?>
|
||
|
||
|
||
<label style="margin-right:0px;"/><input type="checkbox" name="access[]" value="<?php echo ($third["id"]); ?>_3" <?php echo ($third['access']?'checked':''); ?>><?php echo ($third["title"]); ?></label>
|
||
|
||
|
||
<?php
|
||
} echo ")     "; } endforeach; endif; ?>
|
||
</div>
|
||
</div><?php endforeach; endif; ?>
|
||
</div><?php endforeach; endif; ?>
|
||
</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>
|
||
|
||
</div>
|
||
<div class="row-fluid"><div id="footer" class="span12"><a href="#" target="_blank"><?php echo (C("CMS_NAME")); ?></a></div>
|
||
</div>
|
||
<script src="/Public/Admin/js/jquery.min.js"></script>
|
||
<script src="/Public/Admin/js/jquery.ui.custom.js"></script>
|
||
<script src="/Public/Admin/js/jquery.uniform.js"></script>
|
||
<script src="/Public/Admin/js/select2.js"></script>
|
||
<script src="/Public/Admin/js/jquery.validate.js"></script>
|
||
<script src="/Public/Admin/js/bootstrap.min.js"></script>
|
||
<script src="/Public/Admin/js/matrix.js"></script>
|
||
<script src="/Public/Admin/layer/layer.js"></script>
|
||
<script src="/Public/Admin/layer/layui.all.js"></script>
|
||
<script src="/Public/Admin/js/formSelects-v4.min.js"></script>
|
||
<script src="/Public/Admin/js/globals.js"></script>
|
||
<script src="/Public/Admin/My97DatePicker/WdatePicker.js"></script>
|
||
<!--编辑器-->
|
||
<script src="/Public/ueditor/ueditor.config.js"></script>
|
||
<script src="/Public/ueditor/ueditor.all.js"></script>
|
||
<!--编辑器end-->
|
||
<!--附件插件-->
|
||
<script type="text/javascript" src="/Public/webuploader/kinderfile.js"></script>
|
||
<script type="text/javascript" src="Public/webuploader/Sortable.js"></script>
|
||
<script type="text/javascript" src="Public/webuploader/morepic.js"></script>
|
||
<!--附件插件end-->
|
||
<script language="javascript">
|
||
//nav导航旁边提示插件
|
||
function AutoScroll(obj){
|
||
$(obj).find("ul:first").animate({
|
||
marginTop:"-25px"
|
||
},500,function(){
|
||
$(this).css({marginTop:"0px"}).find("li:first").appendTo(this);
|
||
});
|
||
}
|
||
$(document).ready(function(){
|
||
setInterval('AutoScroll("#s1")',6000);
|
||
});
|
||
function logout(){
|
||
layer.confirm("您确定要退出吗?",function(){
|
||
window.location.href="<?php echo U('Public/logout');?>";
|
||
})
|
||
}
|
||
</script>
|
||
</body>
|
||
</html>
|
||
|
||
<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>
|